Answer the question
In order to leave comments, you need to log in
Gunicorn + Django. ModuleNotFoundError: module named diasmart (my project) not found?
This is how the
diasmart file structure looks like - this is the project folder where settings.py, wsgi.py, etc. are stored
. I have a bash file start_gunicorn.sh
#!/bin/bash
source /root/DiaStore/env/bin/activate # виртуальное окружение
exec gunicorn -c "/root/DiaStore/src/gunicorn_config.py" diasmart.wsgi
self.callable = self.load()
File "/root/DiaStore/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/root/DiaStore/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/root/DiaStore/env/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'diasmart'
[2020-07-30 16:50:09 +0000] [109587] [INFO] Worker exiting (pid: 109587)
[2020-07-30 16:50:09 +0000] [109585] [INFO] Shutting down: Master
[2020-07-30 16:50:09 +0000] [109585] [INFO] Reason: Worker failed to boot.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question