Opened 5 years ago

Closed 5 years ago

#20029 closed Bug (invalid)

Django 1.5 / gunicorn 0.17.2 won't start

Reported by: andreas@… Owned by: nobody
Component: Core (Management commands) Version: 1.5
Severity: Normal Keywords: django, gunicorn, connection
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Starting with Django 1.5

gunicorn_django --settings="project.settings" --pythonpath="."

Produces the following in the logfile:

Traceback (most recent call last):
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/", line 485, in spawn_worker
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/workers/", line 100, in init_process
    self.wsgi =
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/", line 103, in wsgi
    self.callable = self.load()
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/", line 101, in load
    return mod.make_wsgi_application()
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/gunicorn/app/", line 36, in make_wsgi_application
    if get_validation_errors(s):
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/core/management/", line 28, in get_validation_errors
    from django.db import models, connection
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/db/", line 11, in <module>
    if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/", line 52, in __getattr__
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/", line 47, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/aneumeier/web/env/local/lib/python2.7/site-packages/django/conf/", line 132, in __init__
    raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'project.settings' (Is it on sys.path?): cannot import name connection

The way I read documentation for 1.5 is, that connection is deprectated.

Change History (1)

comment:1 Changed 5 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top