1

I am using a python package from Gray Arrow's Dejavu. I have installed all the required dependencies and other packages necessary to run my code. When running the following code:

    import warnings
    import json
    warnings.filterwarnings("ignore")

    from dejavu import Dejavu
    from dejavu.recognize import FileRecognizer

    with open('dejavu.cnf') as f:
        config = json.load(f)

    djv = Dejavu(config)

    djv.fingerprint_file('mp3/Sean-Fournier--Falling-For-You.mp3')

    song = djv.recognize(FileRecognizer, 'mp3/Sean-Fournier--Falling-For- 
    You.mp3')

    print("from file recognized: {}\n".format(song))

I receive the following errors:

    Traceback (most recent call last):
      File "testing.py", line 13, in <module>
        djv.fingerprint_file('mp3/Sean-Fournier--Falling-For-You.mp3')

      File "D:\dejavu-master\dejavu\__init__.py", line 109, in 
    fingerprint_file song_name=song_name

      File "D:\dejavu-master\dejavu\__init__.py", line 182, in 
    _fingerprint_worker channels, Fs, file_hash = decoder.read(filename, 
    limit)

      File "D:\dejavu-master\dejavu\decoder.py", line 51, in read
        audiofile = AudioSegment.from_file(filename)

      File "C:\Program Files\Python37\lib\site- 
    packages\pydub\audio_segment.py", line 665, in from_file info = 
    mediainfo_json(orig_file)

      File "C:\Program Files\Python37\lib\site-packages\pydub\utils.py", 
    line 263, in mediainfo_json res = Popen(command, 
    stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)

      File "C:\Program Files\Python37\lib\subprocess.py", line 775, in 
    __init__ restore_signals, start_new_session)

      File "C:\Program Files\Python37\lib\subprocess.py", line 1178, in 
    _execute_child startupinfo)

    FileNotFoundError: [WinError 2] The system cannot find the file 
    specified

I have done complete re-installations of python 3.7 and all of the packages and dependencies to attempt correction of this problem.

I do not understand what file cannot be found and have done research in hopes to find an answer to this issue. I truly appreciate any help and knowledge that can be shared with me on this topic.

Codi White
  • 15
  • 7

1 Answers1

0

Try and place "Sean-Fournier--Falling-For-You.mp3" file in the exact directory you have your script, I don't think the folder reference to the mp3 folder is being handled correctly :)

djv.fingerprint_file('mp3/Sean-Fournier--Falling-For-You.mp3')

song = djv.recognize(FileRecognizer, 'mp3/Sean-Fournier--Falling-For- 
You.mp3')
David Silveiro
  • 1,515
  • 1
  • 15
  • 23
  • Thank you @David, I now have another set of issues but these I will be able to repair myself. Thanks again! – Codi White Apr 10 '19 at 03:56