Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error freeze_support() , not going to be frozen to produce an executable #1

Closed
jimzou opened this issue Mar 23, 2020 · 3 comments
Closed

Comments

@jimzou
Copy link

jimzou commented Mar 23, 2020

Hi
When I run python generate.py configs/demo.yaml, I get the following error:
`raceback (most recent call last):
File "", line 1, in
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "D:\ProgramData\Anaconda3\envs\oflow\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\0.unity_prj\Fusions\occupancy_flow-master\generate.py", line 78, in
for it, data in enumerate(tqdm(test_loader)):
File "D:\ProgramData\Anaconda3\envs\oflow\lib\site-packages\tqdm_tqdm.py", line 979, in iter
for obj in iterable:
File "D:\ProgramData\Anaconda3\envs\oflow\lib\site-packages\torch\utils\data\dataloader.py", line 819, in iter
return _DataLoaderIter(self)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\site-packages\torch\utils\data\dataloader.py", line 560, in init
w.start()
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "D:\ProgramData\Anaconda3\envs\oflow\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

This probably means that you are not using fork to start your
child processes 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 an executable.`

I download oflow_w_correspond_model-13c0a3ed.pt to use locally.

@m-niemeyer
Copy link
Collaborator

Hi @jimzou,

Thanks a lot for your interest in our project! Could it be that you are using Windows as your operating system? We have developed and tested the project on Linux (Ubuntu).

If you are using Windows, I would highly recommend to do a Google search for your problem as this seems OS specific. It looks like you encounter a recurring problem, so probably you can easily find a solution for this: pytorch/pytorch#7485

Best,
Michael

@jimzou
Copy link
Author

jimzou commented Mar 24, 2020

had been solved
Thanks

@jimzou jimzou closed this as completed Mar 24, 2020
@haryngod
Copy link

@jimzou How did you solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants