worldveil / dejavu

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

error when fingerprinting on windows 7? #28

Closed bizkit1 closed 10 years ago

bizkit1 commented 10 years ago

Hey guys. Any idee why i get this error when running go.py for fingerprinting?

Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data) File "C:\Python27\lib\multiprocessing\forking.py", line 495, in prepare 'parents_main', file, path_name, etc File "D:\pipi\go.py", line 17, in djv.fingerprint_directory("", [".mp3"]) File "D:\pipi\dejavuinit.py", line 44, in fingerprint_directory pool = multiprocessing.Pool(nprocesses) File "C:\Python27\lib\multiprocessinginit.py", line 232, in Pool return Pool(processes, initializer, initargs, maxtasksperchild) File "C:\Python27\lib\multiprocessing\pool.py", line 159, in init self._repopulate_pool() File "C:\Python27\lib\multiprocessing\pool.py", line 222, in _repopulate_pool w.start() File "C:\Python27\lib\multiprocessing\process.py", line 130, in start self._popen = Popen(self) File "C:\Python27\lib\multiprocessing\forking.py", line 258, in init cmd = get_command_line() + [rhandle] File "C:\Python27\lib\multiprocessing\forking.py", line 358, in get_command_li ne Traceback (most recent call last): File "", line 1, in is not going to be frozen to produce a Windows executable.''') File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main RuntimeErrorTraceback (most recent call last): : prepare(preparation_data) File "", line 1, in

File "C:\Python27\lib\multiprocessing\forking.py", line 495, in prepare Attempt to start a new process before the current process has finished its bootstrapping phase.

        This probably means that you are on Windows and you have
        forgotten to use the proper idiom in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce a Windows executable.  File "C:

\Python27\lib\multiprocessing\forking.py", line 380, in main

'__parents_main__', file, path_name, etc

prepare(preparation_data) File "D:\pipi\go.py", line 17, in File "C:\Python27\lib\multiprocessing\forking.py", line 495, in prepare djv.fingerprint_directory("", [".mp3"]) 'parents_main', file, path_name, etc File "D:\pipi\dejavuinit.py", line 44, in fingerprint_directory File "D:\pipi\go.py", line 17, in pool = multiprocessing.Pool(nprocesses) File "C:\Python27\lib\multiprocessinginit.py", line 232, in Pool djv.fingerprint_directory("", [".mp3"]) return Pool(processes, initializer, initargs, maxtasksperchild) File "D:\pipi\dejavuinit.py", line 44, in fingerprint_directory File "C:\Python27\lib\multiprocessing\pool.py", line 159, in init pool = multiprocessing.Pool(nprocesses) self._repopulate_pool() File "C:\Python27\lib\multiprocessing\pool.py", line 222, in _repopulate_pool File "C:\Python27\lib\multiprocessinginit.py", line 232, in Pool w.start() File "C:\Python27\lib\multiprocessing\process.py", line 130, in start self._popen = Popen(self) File "C:\Python27\lib\multiprocessing\forking.py", line 258, in init return Pool(processes, initializer, initargs, maxtasksperchild) cmd = get_command_line() + [rhandle] File "C:\Python27\lib\multiprocessing\pool.py", line 159, in init File "C:\Python27\lib\multiprocessing\forking.py", line 358, in get_command_li ne self._repopulate_pool() is not going to be frozen to produce a Windows executable.''') RuntimeError File "C:\Python27\lib\multiprocessing\pool.py", line 222, in _repo pulate_pool

worldveil commented 10 years ago

As stated in the README.md, I have not tested this on any non-Unix systems. My guess is that since Unix multiprocessing uses the fork() call and Windows does not, that is what is causing the difference.

I don't plan to support Windows.