Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#58 closed defect (invalid)

Creating user from interactive interpreter doesn't work with MySQL

Reported by: Manuzhai <mail@…> Owned by: Adrian Holovaty
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: no UI/UX: no

Description

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/__init__.py", line 1, in ?
    from django.core import meta
  File "/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/meta.py", 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/__init__.py", 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 by Antonio Cavedoni, 19 years ago

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 by Manuzhai <mail@…>, 19 years ago

Resolution: invalid
Status: newclosed

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