Unable to do create new cards on Anki

image

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.

Please advise what I should do…I need it urgently

Please, check this:

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.

The “permission are set incorrectly” document is not opening for me so I have not tried this.

image

https://docs.ankiweb.net/platform/windows/permission-problems.html

Nope this does not resolve the problem either

The Command Prompt ended with the following message:

image

The same error message is coming up after doing ^.

Sorry it didn’t work. If you have followed these steps, I have no idea what could be the problem, but I’m sure someone else will chime in.

image
I press on sync
image
This message comes up.
image
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

image
Then after opening Anki again this message comes up

Maybe you should try to export your whole collection, then simply remove the database file, and import it again.

I’m not sure how you do that…could you please provide some details.
Thanks

What message do you see after opening Anki while holding down the shift key, then using Tools>Check Database?

The same error comes up after doing both. It lets me review cards but I can’t make any new cards.

  1. 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.
  2. Backup of the collection.
    • Open Anki.
    • Make a backup of your collection as explained here.
    • Close Anki.
  3. 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.
  4. Recreation of a supposedly non-bugged collection file
    • Open Anki.
    • Use Tools > Check Database to ensure the automatically generated empty database is working.
  5. Reimporting the old collection
    • Import your collection as explained here.
    • 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.

2 Likes