Data Base Problem

I am getting this error, I need help. Thanks.

An error occurred. Please use Tools > Check Database to see if that fixes the problem.
If problems persist, please report the problem on our support site. Please copy and paste the information below into your report.
Anki 2.1.46 (94913ec2) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=False sv=2
Add-ons, last update check: 2021-08-23 13:33:27

Traceback (most recent call last):
File “aqt\”, line 523, in loadCollection
File “aqt\”, line 672, in moveToState
File “aqt\”, line 679, in _deckBrowserState
File “aqt\”, line 68, in show
File “aqt\”, line 143, in _renderPage
File “aqt\”, line 150, in __renderPage
File “aqt\”, line 173, in renderStats
File “anki\”, line 826, in studied_today
File “anki_backend\”, line 61, in studied_today
File "anki_backend_init
.py", line 131, in _run_command
anki.errors.DBError: DbError { info: “SqliteFailure(Error { code: DatabaseCorrupt, extended_code: 11 }, Some(“database disk image is malformed”))”, kind: Other }

Have you already tried to “Check Database” ?

I have tried it but still I get this error.

See if it solves your problem:

1 Like

I can not download that file Clicking on it but it is not starting.

You should be prompted to download the file somewhere. Doesn’t that work? Maybe try with a different web browser.

After downloading it, you have to run it from the command line as written in the manual:

Copy the sqlite3.exe program and your deck to your desktop. Then go to Start>Run and type in cmd.exe .

1 Like

It is not working… Can you download the file and upload it to any site so that I may download it from there. Please.

Hast du die Datei entzipt?

Did you check all of your backups? That command should only be used as a last resort, and is not guaranteed to work.

image As a first solution they offered(Switch the profile) I did it but then this message occured. I don’t know what to do. I have to study my decks on the internet and it’s getting boring without add-ons.

And after that message this occurs.This backing up process never ends.

1 Like

If your collection was saved on AnkiWeb, you could force changes in one direction and download it from there, overwriting your corrupted one. You may lose your images or audio if the option “Synchronize audio and images too” on the preferences wasn’t checked the last time you synced successfully.
Is that right @dae ?

If you open the Switch Profile screen, create a new profile, and open it, does it open correctly? If so, you should be able to either import a backup into it (one that is old enough that it was created before the problem started), or synchronize your decks from AnkiWeb as @01101 suggested.

when I click to switch profile it says that my files are corrupted. Still hasn’t changed a thing.

Hello guys, I solved the problem myself by downloading the old version. The new version is problematic with me. Idk why. If you have the same problem you can download the old version that might help you. Thanks for your comments.

I experienced this problem, as well–I wasn’t able to use the suggested Switch Profile option suggested above because of the error nir1a explained with a screenshot in Post #11 above: after clicking Switch Profile, Anki displays the error message “Your collection file appears to be corrupt. …” and then displays a “Backing Up…” progress popup that never ends. At that point, Anki is frozen.

I think the corruption occurred because I was backing up the Anki2 folder using Google Drive, which I just learned is an unsupported practice that’s know to cause issues. I was using my laptop offline a lot, and there may have been some sudden disconnections, which would affect both Anki and Google Drive sync.

Here’s how I solved it without having to revert to an older Anki version. Note: I had automatic backups enabled, so no local data was lost, but even if you don’t have a local backup, this process will also enable you to “Switch Profile” and sync from the web:

  1. Close Anki (Force Quit/End Task if necessary).
  2. Rename the profile folder in the Anki2 folder (find that by reading the Anki manual: Managing Files/File Locations) by appending “_OLD” (don’t delete; it contains automatic backups and media files. FYI, the default profile name is User 1.
  3. Open Anki. Dismiss prompts about empty collections.
  4. Restore a backup that you would find in the backups folder in the “_OLD” profile folder you just renamed, or restore from another .colpkg file, or sync all changes from AnkiWeb to the new profile (please research how to do that if it’s your only option–it’s beyond this post’s scope).

I hope that helps!