PythonHandler trac.web.modpython_frontend: DatabaseError: unsupported
file format
I tried running `trac-admin` against the project and `sqlite3` with
the database on both machines and neither has a problem. Apparently
only access through mod_python is an issue.
I've read through http://projects.edgewall.com/trac/wiki/PySqlite and
tried the 3.x.y to 3.x.y upgrade instructions. This had no effect (as
expected).
The only notable differences I see between the two machines are the
versions of python and mod_python being used. The FC5 box is running
python 2.4 and mod_python 3.2.8 and the CentOS box is running python
2.3 and mod_python 3.1.3. Common software is Sqlite 3.3.3, Apache
2.0.5x and python-sqlite 1.1.7.
I've examined /proc/<pid>/maps looking for usage of sqlite libs for
apache, trac-admin, and the sqlite3 command and they're all definitely
using the same libs.
I'm at a loss. If anyone might be able to help me get to the bottom of
this, I would really appreciate it. If I left something out that would
be helpful, let me know. I'm more than happy to provide any information
needed to assist me with this.
Thanks in advance.
Have you tried dumping the database on the FC5 and reloading it on Cent?
(instead of copying the raw file)
Try this on FC5:
$ sqlite3 /path/to/trac.db
sqlite> .output trac-dumpfile.sql
sqlite> .dump
sqlite> <ctrl-d>
Then on Cent:
$ sqlite3 /path/to/new/but/empty/trac.db
sqlite> .read trac-dumpfile.sql
sqlite> <ctrl-d>
HTH,
Matt
Thanks for the input. I tried dumping the database on the FC5 box and
reading it back in on the CentOS box, but no luck. Both machines are
running the same exact version of sqlite though, so I'm not surprised.
Sqlite itself has no problem with the database file format. It seems
the problem only arises when mod_python is in the picture.
If I open the project in trac-admin on the CentOS box everything works
fine. I can make changes to the database via trac-admin with no
problems. Trac-admin is a python script which uses the python-sqlite
libs, so clearly the python-sqlite libs are working. Somehow the libs
don't work in the mod_python case.
> HTH,
> Matt
Look again those maps on the CentOS box, perhaps you have another module
(php-sqlite?) that has the sqlite3 code linked in it?
It looks like it's the same issue reported in
http://trac.edgewall.org/ticket/3075, for which we gave a few pointers.
It usually boils down to having a different (older) SQLite version
getting used.
-- Christian
Thanks for the advice Christian. I've used that ticket for reference
and tried all the pointers that seem to apply. I do have a PHP 5 module
installed, but the problem is not resolved when I disable it. There are
no other modules enabled which use Sqlite to my knowledge.
There were earlier versions of the sqlite and python-sqlite libs
installed when I first ran into this issue. I upgraded them to the
current versions after reading
http://projects.edgewall.com/trac/wiki/PySqlite. Those libs are now the
same versions used on the source (FC5) machine.
Is it possible python, or mod_python, is using some kind of lib cache?
Where it somehow still has a copy of the old libs?
-WolfpakZ
> > It usually boils down to having a different (older) SQLite version
> > getting used.
>
> Is it possible python, or mod_python, is using some
kind of lib cache?
> Where it somehow still has a copy of the old libs?
>
> -WolfpakZ
>
The thing with versions is that it sometimes isn't
what you think it is - it certainly wasn't for me when I spent time on researching
an SQLite problem. Turned out that PySQLite had decided to use the default
(old) OSX bindings despite all my efforts to provide a shining new version.
I have added my moment of break-through to the PySqlite wiki page:
http://trac.edgewall.org/wiki/PySqlite#DetermineactualSQLiteandPySqliteversion
:::simon
simon...@bvnetwork.no / osimons