SQLite - unsupported file format

553 views
Skip to first unread message

Panos Laganakos

unread,
May 15, 2007, 6:03:34 AM5/15/07
to Django users
OS: Mac OS X - 10.4
SQLite: 3.1.3
Django: 0.96
Python: 2.5

I've set the DATABASE_ENGINE to 'sqlite3', and the db gets created
when I call

$manage.py syncdb

And the project/apps all work fine.

When I try to connect to it from the commandline 'sqlite3' tool, or
pipe manage.py clearsql [appname], etc. I get an 'error: unsupported
file format', when I try to execute any statement or view tables etc.

Same thing happens if I try to pipe output into sqlite3, ie:

$manage.py sqlclear [appname] | sqlite3 my.db


Can't figure out what seems to be the problem here.

Lars Stavholm

unread,
May 15, 2007, 6:47:54 AM5/15/07
to django...@googlegroups.com

Version mismatch maybe? Try sqlite/sqlite2 on the created db.
If that works, the db is sqlite version 2.
What version of python sqlite bindings are you using?
I have the following and it works just great:

SuSE Linux 10.2
sqlite 3.3.8
Django from SVN a week ago.
Python 2.5
pysqlite 2.3.2

Cheers
/Lars

Panos Laganakos

unread,
May 15, 2007, 2:17:44 PM5/15/07
to Django users
I haven't installed any pysqlite versions since I moved to 2.5 (from
OS X's default 2.3) Python, as sqlite3 is included in the lib module
by default.

I uploaded the db on the production server though, and sqlite3 client:
3.3.5 seems to open the file just fine. So as you mentioned it must be
a type mismatch? I'll if I can an updated binary of SQLite3 > 3.1.3
for OS X.

Panos Laganakos

unread,
May 16, 2007, 10:07:01 AM5/16/07
to Django users
Reply all
Reply to author
Forward
0 new messages