from app import create_app
from config import current_config
import asyncio
app = asyncio.run(create_app())
app.run(host=“0.0.0.0”, port=current_config.SERVER_PORT, debug=current_config.DEBUG)
This is giving the error
warn(
Traceback (most recent call last):
File “”, line 1, in
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 120, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 129, in _main
prepare(preparation_data)
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 240, in prepare
_fixup_main_from_path(data[‘init_main_from_path’])
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 291, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 291, in run_path
File “”, line 98, in _run_module_code
File “”, line 88, in _run_code
File “/Users/devkigupta/Desktop/firebolt/entrypoint.py”, line 6, in
import run
File “/Users/devkigupta/Desktop/firebolt/run.py”, line 17, in
app.run(host=“0.0.0.0”, port=current_config.SERVER_PORT, debug=current_config.DEBUG)
File “/Users/devkigupta/Desktop/firebolt/eenv/lib/python3.11/site-packages/sanic/mixins/startup.py”, line 209, in run
serve(primary=self) # type: ignore
^^^^^^^^^^^^^^^^^^^
File “/Users/devkigupta/Desktop/firebolt/eenv/lib/python3.11/site-packages/sanic/mixins/startup.py”, line 748, in serve
sync_manager = Manager()
^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/context.py”, line 57, in Manager
m.start()
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/managers.py”, line 563, in start
self._process.start()
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/process.py”, line 121, in start
self._popen = self._Popen(self)
^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/context.py”, line 288, in _Popen
return Popen(process_obj)
^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_spawn_posix.py”, line 32, in init
super().init(process_obj)
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_fork.py”, line 19, in init
self._launch(process_obj)
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/popen_spawn_posix.py”, line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 158, in get_preparation_data
_check_not_importing_main()
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/spawn.py”, line 138, 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.
Traceback (most recent call last):
File “/Users/devkigupta/Desktop/firebolt/entrypoint.py”, line 6, in
import run
File “/Users/devkigupta/Desktop/firebolt/run.py”, line 17, in
app.run(host=“0.0.0.0”, port=current_config.SERVER_PORT, debug=current_config.DEBUG)
File “/Users/devkigupta/Desktop/firebolt/eenv/lib/python3.11/site-packages/sanic/mixins/startup.py”, line 209, in run
serve(primary=self) # type: ignore
^^^^^^^^^^^^^^^^^^^
File “/Users/devkigupta/Desktop/firebolt/eenv/lib/python3.11/site-packages/sanic/mixins/startup.py”, line 748, in serve
sync_manager = Manager()
^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/context.py”, line 57, in Manager
m.start()
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/managers.py”, line 567, in start
self._address = reader.recv()
^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py”, line 249, in recv
buf = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py”, line 413, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File “/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/multiprocessing/connection.py”, line 382, in _recv
raise EOFError
EOFError
This is working fine in 21.12.2