Modify ↓
Ticket #2585 (closed defect: worksforme)
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
comment:1 Changed 5 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
comment:2 Changed 5 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.
Note: See
TracTickets for help on using
tickets.



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.