Not working on Windows
cristianocca opened this issue · comments
As usual, multiprocessing and Windows do not work well together. However, it might be easy to fix in this case. I would recommend allowing for a non parallel option to make running on Windows easier.
See the stack trace below:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main
prepare(preparation_data)
File "C:\Python27\lib\multiprocessing\forking.py", line 510, in prepare
'__parents_main__', file, path_name, etc
File "C:\Users\Cristiano\Desktop\DumpsterDiver-master\DumpsterDiver-master\DumpsterDiver.py", line 3, in <module>
import advancedSearch
File "C:\Users\Cristiano\Desktop\DumpsterDiver-master\DumpsterDiver-master\advancedSearch.py", line 3, in <module>
import core
File "C:\Users\Cristiano\Desktop\DumpsterDiver-master\DumpsterDiver-master\core.py", line 42, in <module>
queue = multiprocessing.Manager().Queue()
File "C:\Python27\lib\multiprocessing\__init__.py", line 99, in Manager
m.start()
File "C:\Python27\lib\multiprocessing\managers.py", line 524, in start
self._process.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_line
is not going to be frozen to produce a Windows executable.''')
RuntimeError:
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.
Traceback (most recent call last):
File "DumpsterDiver.py", line 3, in <module>
import advancedSearch
File "C:\Users\Cristiano\Desktop\DumpsterDiver-master\DumpsterDiver-master\advancedSearch.py", line 3, in <module>
import core
File "C:\Users\Cristiano\Desktop\DumpsterDiver-master\DumpsterDiver-master\core.py", line 42, in <module>
queue = multiprocessing.Manager().Queue()
File "C:\Python27\lib\multiprocessing\__init__.py", line 99, in Manager
m.start()
File "C:\Python27\lib\multiprocessing\managers.py", line 528, in start
self._address = reader.recv()
EOFError
Thanks @cristianocca for raising the issue. It's true I was testing it only on Linux and Mac. I'll sit on it during the weekend and try to fix this issue.
Hi @xep624, this issue still persists. would there be an update to fix the same ?