Tricky problem in the tutorial #713
Replies: 1 comment
-
When I run the code again, error message becomes different as follows: UserWarning: Cannot import module '<module 'test' from 'd:\ML\test.py'>' when searching ProcessModels for Process 'LIF'. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just started learning Lava a a few days ago and encountered a tricky problem during the tutorial. Using vscode and conda, I copied all the code in tutorial02_processes.ipynb. But at runtime, I found an error in the lif. run() method. After analyzing the error content, I found that the problem lies in spec.loader.exec_module(module) which belongs to line 850 of the compiler_graphs.py file. This method creates a Child process, but as far as I know, tutorial02 only needs one LIF process. May I ask what is the purpose of the .loader.exec_module() method? Thank you for your reply.
Specific error message as follows:
PS D:\ML> & D:/Anaconda3/envs/lava/python.exe d:/ML/test1.py
Traceback (most recent call last):
File "", line 1, in
File "D:\Anaconda3\envs\lava\lib\multiprocessing\spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "D:\Anaconda3\envs\lava\lib\multiprocessing\spawn.py", line 125, in _main
prepare(preparation_data)
File "D:\Anaconda3\envs\lava\lib\multiprocessing\spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\envs\lava\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "D:\Anaconda3\envs\lava\lib\runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "D:\Anaconda3\envs\lava\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "D:\Anaconda3\envs\lava\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
Beta Was this translation helpful? Give feedback.
All reactions