#5531: ImportError: No module named mysql.base
-------------------------+--------------------------------------------------
Reporter: anonymous | Owner: nobody
Status: new | Component: Database wrapper
Version: SVN | Resolution:
Keywords: mysql | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
-------------------------+--------------------------------------------------
Comment (by ramiro):
Can you try changing the exception thwon on line 20 from {{{ImportError}}}
to {{{ImproperlyConfigured}}} applying this mini-patch?:
{{{
#!diff
diff -r 32a3fe78cb9b django/db/backends/mysql/base.py
--- a/django/db/backends/mysql/base.py Mon Sep 17 11:48:33 2007 -0300
+++ b/django/db/backends/mysql/base.py Tue Sep 18 07:50:05 2007 -0300
@@ -17,7 +17,8 @@ version = Database.version_info
version = Database.version_info
if (version < (1,2,1) or (version[:3] == (1, 2, 1) and
(len(version) < 5 or version[3] != 'final' or version[4] < 2))):
- raise ImportError("MySQLdb-1.2.1p2 or newer is required; you have %s"
% Database.__version__)
+ from django.core.exceptions import ImproperlyConfigured
+ raise ImproperlyConfigured("MySQLdb-1.2.1p2 or newer is required; you
have %s" % Database.__version__)
from MySQLdb.converters import conversions
from MySQLdb.constants import FIELD_TYPE
}}}
(and yes, anything older than MySQLdb 1.2.1p1 won't work:
http://www.djangoproject.com/documentation/databases/#mysqldb
http://code.djangoproject.com/changeset/4751
Upgrade to a non-gamma version of MySQLdb)
--
Ticket URL: <http://code.djangoproject.com/ticket/5531#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---