Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2585 closed defect (worksforme)

Command failed: file is encrypted or is not a database

Reported by: Markus Tacker <m@…> Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (0)

Change History (4)

comment:1 by Emmanuel Blot, 18 years ago

Priority: highnormal
Resolution: worksforme
Severity: criticalnormal
Status: newclosed

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 by Matthew Good, 18 years ago

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 by Markus Tacker <m@…>, 18 years ago

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 by Emmanuel Blot, 18 years ago

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.