We’ve finally solved the last problem connected to Fedora Core upgrade from version 3 to version 4. After the upgrade our Trac stopped working completely with the following error message:
Oops...
Trac detected an internal error:
file is encrypted or is not a database
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/trac/core.py", line 531, in cgi_start
real_cgi_start()
File "/usr/lib/python2.4/site-packages/trac/core.py", line 513, in real_cgi_start
env = open_environment()
File "/usr/lib/python2.4/site-packages/trac/core.py", line 190, in open_environment
version = env.get_version()
File "/usr/lib/python2.4/site-packages/trac/Environment.py", line 162, in get_version
cursor.execute("SELECT value FROM system WHERE name='database_version'")
File "/usr/src/build/539311-i386/install//usr/lib/python2.4/site-packages/sqlite/main.py", line 244, in execute
DatabaseError: file is encrypted or is not a database
We’ve finally tracked the problem to SQLite version 2.x vs 3.x
On Fedora Core 4, Trac uses SQLite 3.x although the trac.db database in conf directory is in version 2.x format. The solution is to manually upgrade all the Trac environment databases to version 3.x:
mv trac.db trac2.db
sqlite trac2.db .dump | sqlite3 trac.db