worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.36k stars 1.43k forks source link

OSError: [Errno 2] No such file or directory #36

Closed compwright closed 10 years ago

compwright commented 10 years ago

When running the following:

directory = "/Users/jhill/Music"
extension = "mp3"
djv.fingerprint_directory(directory, ["." + extension], 1)

I get the following error:

Failed fingerprinting
Traceback (most recent call last):
  File "/Users/jhill/Sites/dejavu/dejavu/__init__.py", line 67, in fingerprint_directory
    song_name, hashes = iterator.next()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py", line 655, in next
    raise value
OSError: [Errno 2] No such file or directory

I have confirmed that the file does indeed exist. Is the real error being obscured by the multiprocessing? What should I do to fix this error?

compwright commented 10 years ago

I also get an error when running the fingerprint_file() method:

Traceback (most recent call last):
  File "go.py", line 64, in <module>
    djv.fingerprint_file(filepath)
  File "/Users/jhill/Sites/dejavu/dejavu/__init__.py", line 89, in fingerprint_file
    song_name=song_name)
  File "/Users/jhill/Sites/dejavu/dejavu/__init__.py", line 162, in _fingerprint_worker
    channels, Fs = decoder.read(filename, limit)
  File "/Users/jhill/Sites/dejavu/dejavu/decoder.py", line 29, in read
    audiofile = AudioSegment.from_file(filename)
  File "build/bdist.macosx-10.9-intel/egg/pydub/audio_segment.py", line 235, in from_file
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 524, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Tracing through the code seems to implicate the pydub package; perhaps it is not installed correctly?

compwright commented 10 years ago

ack, didn't have ffmpeg installed. A quick brew install ffmpeg fixed everything.