Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 131, in _main
prepare(preparation_data)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 246, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 297, in _fixup_main_from_path
main_content = [runpy.run](https://github.com/SMTG-Bham/ThermoParser/issues/runpy.run)_path(main_path,
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 291, in run_path
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/Users/fnattino/tmp/ThermoParser/ThermoParser/examples/data/zno/t02.py", line 25, in <module>
tp.plot.phonons.add_wideband(ax, kdata, pdata, temperature=temperature,
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/site-packages/tp/plot/phonons.py", line 1193, in add_wideband
with Pool(processes=workers) as pool:
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 215, in __init__
self._repopulate_pool()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 306, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/pool.py", line 329, in _repopulate_pool_static
w.start()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/context.py", line 288, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_spawn_[posix.py](https://github.com/SMTG-Bham/ThermoParser/issues/posix.py)", line 32, in __init__
super().__init__(process_obj)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_[fork.py](https://github.com/SMTG-Bham/ThermoParser/issues/fork.py)", line 19, in __init__
self._launch(process_obj)
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/popen_spawn_[posix.py](https://github.com/SMTG-Bham/ThermoParser/issues/posix.py)", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 164, in get_preparation_data
_check_not_importing_main()
File "/opt/miniconda3/envs/ThermoParser/lib/python3.11/multiprocessing/spawn.py", line 140, in _check_not_importing_main
raise RuntimeError('''
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.
To fix this issue, refer to the "Safe importing of main module"
section in https://docs.python.org/3/library/multiprocessing.html