Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#58 closed defect (invalid)

Creating user from interactive interpreter doesn't work with MySQL

Reported by: Manuzhai <mail@…> Owned by: adrian
Component: Database layer (models, ORM) Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


from django.models.auth import users doesn't seem to work with MySQL. I get the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/models/", line 1, in ?
    from django.core import meta
  File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/", line 2, in ?
    from django.core import db
  File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/db/", line 22, in ?
    raise ImproperlyConfigured, "Your DATABASE_ENGINE setting, %r, is invalid. Is it spelled correctly?" % DATABASE_ENGINE
django.core.exceptions.ImproperlyConfigured: Your DATABASE_ENGINE setting, 'mysql', is invalid. Is it spelled correctly?

I tried checking out the source code to see what caused the error, but this is a little hard, as there is a circular import from db.init and db.backends.mysql, so it seems I can't really see where the problem is coming from.

Change History (2)

comment:1 Changed 10 years ago by verbosus

Which version of MySQL are you using? Are you using InnoDB?

I’m asking because I had no problems with MySQL 4.1.1 (MyISAM) on OS X 10.4.2

comment:2 Changed 10 years ago by Manuzhai <mail@…>

  • Resolution set to invalid
  • Status changed from new to closed

Okay, never mind, I f*cked it up. MySQLdb is only installed for Python-2.3, running the interpreter from 2.4.

Nevertheless, the circular import is still obscures where the exception is actually raised.

Note: See TracTickets for help on using tickets.
Back to Top