Edgewall Software

Ticket #2585 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 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:

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

Changed 3 years ago by eblot

  • priority changed from high to normal
  • status changed from new to closed
  • resolution set to worksforme
  • severity changed from critical to normal

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.

Changed 3 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.

Changed 3 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.

Changed 3 years ago by eblot

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

Add/Change #2585 (Command failed: file is encrypted or is not a database)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.