Opened 19 years ago
Closed 19 years ago
#2156 closed defect (worksforme)
misleading error message when python2.3-sqlite2 is missing
| Reported by: | HolgerSchurig | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Problem
When the sqlite database python module is missing, I see a strange error message "cannot import name backend".
How to reproduce
Create a brand new project with "django-admin.py startproject test", "cd test" and set
DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = '/tmp/sqlite3.db' DATABASE_USER = '' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = ''
Now run "python manage.py runserve" and access "http://127.0.0.1/admin/" and you will see this strange error message
$ python manage.py runserver
Validating models...
0 errors found.
Django version 0.95 (post-magic-removal), using settings 'blog2.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[14/Jun/2006 09:51:02] "GET /admin/ HTTP/1.1" 404 2051
Validating models...
Skipping validation because things aren't configured properly.
Django version 0.95 (post-magic-removal), using settings 'blog2.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py", line 272, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python2.3/site-packages/django/core/servers/basehttp.py", line 615, in __call__
return self.application(environ, start_response)
File "/usr/lib/python2.3/site-packages/django/core/handlers/wsgi.py", line 140, in __call__
self.load_middleware()
File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py", line 31, in load_middleware
raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e)
ImproperlyConfigured: Error importing middleware django.contrib.sessions.middleware: "cannot import name backend"
[14/Jun/2006 09:51:40] "GET /admin/ HTTP/1.1" 500 780
As soon as I installed the Debian package "python2.3-pysqlite2" I got back a page which was more sane (moaning about a missing admin entry in urls.py).
Note:
See TracTickets
for help on using tickets.
I can't reproduce this...