Resolving corrupt database

Any suggestions to resolve a corrupt database? No troubleshooting steps resolved the issue. I have deleted the application and redownloaded several times. I have copied the debug info below.

Anki 25.02.7 (1b882285)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-12.7.6-x86_64-i386-64bit

Traceback (most recent call last):
File “aqt.progress”, line 121, in handler
File “aqt.main”, line 231, in on_window_init
File “aqt.main”, line 330, in setupProfile
File “aqt.main”, line 545, in loadProfile
File “anki.scheduler.base”, line 59, in day_cutoff
File “anki.scheduler.base”, line 51, in _timing_today
File “anki._backend_generated”, line 730, in sched_timing_today
File “anki._backend”, line 172, in _run_command
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some("database disk image is malformed"))”, kind: Other }

First try and restore a backup.

If that doesn’t work

  1. Make sure Anki’s closed
  2. Find your collection file ~/Library/Application Support/Anki2/[Your Profile]:
  1. Rename collection.anki2 to something else like collection.anki2.corrupt
  2. It should allow you in the profile again if you open Anki back up.

See also: Managing Files - Anki Manual

1 Like