I get this error everytime I do anything on Anki (On Windows). When the application opens it asks either to Upload to AnkiWeb or Download AnkiWeb. Regardless everytime either of them are pressed this error comes up. Even when I try create new cards (Basic…all types) this error shows up. I have restarted the computer several times and updated the Anki software to the latest version. I have done all the steps on the support page but nothing has seemed to work. I have checked database and media as well and even tried all three drivers on it.
I tried opening backups from several dates in the past where I recall the software to be working fine but the same error message shows up and it doesn’t let me add any new cards. All old cards are safe and are able to be reviewed etc. But everytime I try to sync or add new the error shows up.
Then when I press upload this message comes back up
A fatal error occurred, and Anki must close. Please report this message on the forums.
Anki 2.1.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=?
Add-ons, last update check: 2022-01-09 17:18:46
Caught exception:
Traceback (most recent call last):
File “aqt\webview.py”, line 41, in cmd
File “aqt\webview.py”, line 142, in _onCmd
File “aqt\webview.py”, line 595, in _onBridgeCmd
File “aqt\toolbar.py”, line 168, in _linkHandler
File “aqt\toolbar.py”, line 192, in _syncLinkHandler
File “aqt\main.py”, line 951, in on_sync_button_clicked
File “aqt\main.py”, line 971, in sync_collection_and_media
File “aqt\sync.py”, line 118, in sync_collection
File “anki\collection.py”, line 216, in save
File “anki\collection.py”, line 211, in modified_by_backend
File “anki\collection.py”, line 205, in mod
File “anki\dbproxy.py”, line 81, in scalar
File “anki\dbproxy.py”, line 60, in query
File "anki_backend_init.py", line 78, in db_query
File "anki_backend_init.py", line 96, in _db_command
pyo3_runtime.PanicException: called Result::unwrap() on an Err value: PoisonError { … }
This happens when I try to download and close the error that comes up saying to start with shift down.
And then Anki closes
Make a backup of your whole Anki directory, just to be sure. You can find out where your files are located here. This is not necessary, but since you’re going to remove files by hand, let’s create a plan B by hand.
Backup of the collection.
Open Anki.
Make a backup of your collection as explained here.
Close Anki.
Deletion of the collection databse
Go to the Anki directory (the one you should have made a backup of earlied).
There is a directory that has the same name of your current profile. Go in it.
There is a file named collection.anki2. Delete it. Do not confuse it with collection.media or collection.media.db2.
Recreation of a supposedly non-bugged collection file
Open Anki.
Use Tools > Check Database to ensure the automatically generated empty database is working.
Use Tools > Check Database to ensure Anki’s database is in a proper state.
Browse your decks to ensure your collection has been fully recovered.
If, for any reason, anything goes wrong, please specify which step has lead to the error, and if there is any error message, post it too.
If you can’t manage to get to a state where you can do what you could before, you can always simply replace the Anki directory with the one you have backed up.