Michael
Michael

Reputation: 833

gunicorn,django ImportError: No module named application

Can anyone help? I recently merged migrations, then ran manage.py migrate, ran into an error, deleted the migrations because I didn't need them (models that I ended up not using). Now I am stuck with this error. Can anyone help? I searched elsewhere and didn't find anyone with the same error. This is just running the code by hand (as you see below). My whole site has a 502 bad gateway error; I imagine it is related to what you see below

♥root@ubuntu-2gb-nyc3-01:/home/mike/movingcollage#gunicorn --bind=unix:/home/mike/movingcollage/movingcollage.sock movingcollage.wsgi.application --preload
/usr/local/lib/python2.7/dist-packages/djstripe/__init__.py:23: UserWarning: dj-stripe deprecation notice: Django 1.7 and lower are no longer
supported. Please upgrade to Django 1.8 or higher.
Reference: https://github.com/pydanny/dj-stripe/issues/275
  warnings.warn(msg)
Traceback (most recent call last):
  File "/usr/local/bin/gunicorn", line 11, in <module>
    sys.exit(run())
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 74, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 185, in run
    super(Application, self).run()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 71, in run
    Arbiter(self).run()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 57, in __init__
    self.setup(app)
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 113, in setup
    self.app.wsgi()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, 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 356, in import_app
    __import__(module)
ImportError: No module named application

Upvotes: 0

Views: 583

Answers (1)

Matthew Schinckel
Matthew Schinckel

Reputation: 35599

Did you mean:

$ gunicorn --bind=... movingcollage.wsgi:application

Upvotes: 3

Related Questions