0
私はgungornの統合をテストするためにDjango/pythonでhelloworldアプリケーションを作っています。私にはディレクトリがあり、start.shファイルがあります。私はテストページをホストするgunicornサーバーを実行したい。私は、次のエラーを取得しています:ここでモジュールなし - gunicorn
omars-mbp:helloworld omarjandali$ ../start.sh
Starting Gunicorn.
[2017-11-13 22:10:43 -0800] [1238] [INFO] Starting gunicorn 19.6.0
[2017-11-13 22:10:43 -0800] [1238] [INFO] Listening at: http://0.0.0.0:8000 (1238)
[2017-11-13 22:10:43 -0800] [1238] [INFO] Using worker: sync
[2017-11-13 22:10:43 -0800] [1241] [INFO] Booting worker with pid: 1241
[2017-11-13 22:10:43 -0800] [1241] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/util.py", line 357, in import_app
__import__(module)
ModuleNotFoundError: No module named 'helloworld'
[2017-11-13 22:10:43 -0800] [1241] [INFO] Worker exiting (pid: 1241)
[2017-11-13 22:10:43 -0800] [1242] [INFO] Booting worker with pid: 1242
[2017-11-13 22:10:43 -0800] [1242] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
worker.init_process()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 126, in init_process
self.load_wsgi()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
self.wsgi = self.app.wsgi()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
return self.load_wsgiapp()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
return util.import_app(self.app_uri)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gunicorn/util.py", line 357, in import_app
__import__(module)
ModuleNotFoundError: No module named 'helloworld'
[2017-11-13 22:10:43 -0800] [1242] [INFO] Worker exiting (pid: 1242)
[2017-11-13 22:10:44 -0800] [1238] [INFO] Shutting down: Master
[2017-11-13 22:10:44 -0800] [1238] [INFO] Reason: Worker failed to boot.
は私のstart.shファイルと私のディレクトリの画像です:
:echo Starting Gunicorn.
exec gunicorn helloworld.wsgi:application \
--bind 0.0.0.0:8000 \
--workers 3
私はWSGIファイル付きのhelloworldフォルダからコードを実行しています