Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1267 closed defect (invalid)

runserver fails with pysqlite 2.1.2 on OS X (works fine with 2.0.3)

Reported by: Wilson Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: normal Keywords: sqlite pysqlite database
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The django-admin.py runserver fails on OS 10.4.4 when the DATABASE_ENGINE is set to 'sqlite3' and pysqlite 2.1.2 is installed (with the standard OS X version of Python 2.3 and sqlite3).

I can import pysqlite2 from the python interactive prompt with no errors, but django-admin.py runserver fails with this traceback:

python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at 0x29b370>
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/management.py", line 760, in inner_run
    validate()
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/management.py", line 744, in validate
    num_errors = get_validation_errors(outfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/management.py", line 635, in get_validation_errors
    import django.models
  File "/Users/wminer/dev/django/src/django/models/__init__.py", line 1, in ?
    from django.core import meta
  File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/django/core/meta/__init__.py", line 3, in ?
    from django.core import db
  File "/Users/wminer/dev/django/src/django/core/db/__init__.py", line 23, in ?
    raise ImproperlyConfigured, "Could not load database backend: %s. Is your DATABASE_ENGINE setting (currently, %r) spelled correctly? Available options are: %s" % \
django.core.exceptions.ImproperlyConfigured: Could not load database backend: dlopen(/Users/wminer/.python-eggs/pysqlite-2.1.2-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so, 2): Symbol not found: _sqlite3_transfer_bindings
  Referenced from: /Users/wminer/.python-eggs/pysqlite-2.1.2-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so
  Expected in: dynamic lookup
. Is your DATABASE_ENGINE setting (currently, 'sqlite3') spelled correctly? Available options are: 'ado_mssql', 'mysql', 'postgresql', 'sqlite3'

The runserver works fine with pysqlite 2.0.3, but 2.1.2 is listed as the "latest stable version" for download.

Change History (4)

comment:1 by Gabor Farkas <gabor@…>, 18 years ago

try this:

open a python shell, and execute this :
from pysqlite2 import dbapi2;

does that work?

comment:2 by anonymous, 18 years ago

It seems likely that this is because pysqlite 2.1.2 requires a newer version of sqlite.
See: http://www.initd.org/tracker/pysqlite/ticket/138
either upgrade sqlite or use the 2.0 branch of pysqlite

comment:3 by Wilson, 18 years ago

Resolution: invalid
Status: newclosed

Closing this because it's more likely an version compatibility issue between sqlite and pysqlite.

comment:4 by James Bennett, 18 years ago

Might also try pysqlite 2.1.3, which has now been released; according to the release notes, "this branch had issues, seems to be stable now".

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