X
X
xxx2017-05-02 19:20:42
Django
xxx, 2017-05-02 19:20:42

Django + Python + Nginx + Gunicorn + DO?

I do it according to
https://djbook.ru/examples/62/
Everything worked fine with the new project, I downloaded the project from github, installed all the dependencies.
I get:

[email protected]:~/Django-blog/mysite$ gunicorn mysite.wsgi.:application --bind мой_ip:8000
[2017-05-02 19:14:17 +0000] [57476] [INFO] Starting gunicorn 19.7.1
[2017-05-02 19:14:17 +0000] [57476] [INFO] Listening at: http://мой_ip:8000 (57476)
[2017-05-02 19:14:17 +0000] [57476] [INFO] Using worker: sync
[2017-05-02 19:14:17 +0000] [57481] [INFO] Booting worker with pid: 57481
[2017-05-02 19:14:17 +0000] [57481] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 135, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 360, in import_app
    mod = sys.modules[module]
KeyError: 'mysite.wsgi.'
[2017-05-02 19:14:17 +0000] [57481] [INFO] Worker exiting (pid: 57481)
[2017-05-02 19:14:17 +0000] [57476] [INFO] Shutting down: Master
[2017-05-02 19:14:17 +0000] [57476] [INFO] Reason: Worker failed to boot.

How to treat?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2017-05-02
@Heavy10110

And you should have a name with a dot?
"mysite.wsgi > .<:application", may need so "mysite.wsgi:application"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question