Edgewall Software
Modify

Ticket #2585 (closed defect: worksforme)

Opened 6 years ago

Last modified 6 years ago

Command failed: file is encrypted or is not a database

Reported by: Markus Tacker <m@…> Owned by: jonas
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords:
Cc:
Release Notes:
API Changes:

Description

Suddenly i get:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
  File "/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 199, in handler\n    env = get_environment(mpr, project_opts)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 335, in get_environment\n    return _open_environment(env_path, threaded)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 51, in _open_environment\n    env_cache[env_path] = open_environment(env_path)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 370, in open_environment\n    if env.needs_upgrade():
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 276, in needs_upgrade\n    if participant.environment_needs_upgrade(db):
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 329, in environment_needs_upgrade\n    dbver = self.env.get_version(db)
  File "/usr/lib/python2.4/site-packages/trac/env.py", line 199, in get_version\n    cursor.execute("SELECT value FROM system WHERE name='database_version'")
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 39, in execute\n    args or [])
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 31, in _rollback_on_error\n    return function(self, *args, **kwargs)
DatabaseError: file is encrypted or is not a database

Access via sqlite command line to the database works.

Attachments

Change History

comment:1 Changed 6 years ago by eblot

  • Priority changed from high to normal
  • Resolution set to worksforme
  • Severity changed from critical to normal
  • Status changed from new to closed

Have a look at TracUpgrade (section From0.8.xto0.9)
Your Trac installation is probably using the wrong version of the PySqlite library. (which can occur after an upgrade of Python or PySQLite for example)

The Sqlite tool is not used by Trac to access the DB, so you may have a sqlite executable that uses SQLite DB 3.0 and a PySQLite lib that uses SQLite DB 2.0 (or vice versa).

You need to double check that the SQLite DB version you have match the PySQLite release Trac uses.

comment:2 Changed 6 years ago by mgood

By upgrading Trac to 0.9.x or installing pysqlite2 Trac is now trying to use pysqlite2 which uses the sqlite3 database format. As eblot mentioned see the upgrade documentation for converting your database to sqlite3.

comment:3 Changed 6 years ago by Markus Tacker <m@…>

Thanks, that worked. A search for "Command failed: file is encrypted or is not a database" didn't turn up the wiki page.

comment:4 Changed 6 years ago by eblot

True, but "file is encrypted or is not a database" does return the right page ;-)

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.