I can't add any cards in my Anki

I usually create cards on my PC then add thyem in Anki. But this time I can’t. And my PC Anki reports this message. Could you help me resolve this issue, please :slight_smile:
Anki 24.11 (87ccd24e) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.26100

Traceback (most recent call last):
File “aqt.taskman”, line 144, in _on_closures_pending
File “aqt.taskman”, line 88, in
File “aqt.taskman”, line 108, in wrapped_done
File “aqt.sync”, line 108, in on_future_done
File “anki.collection”, line 210, in _load_scheduler
File “anki.collection”, line 203, in sched_ver
File “anki.config”, line 81, in get
File “anki.config”, line 62, in getitem
File “anki.config”, line 43, in get_immutable
File “anki._backend_generated”, line 566, in get_config_json
File “anki._backend”, line 161, in _run_command
pyo3_runtime.PanicException: called Result::unwrap() on an Err value: PoisonError { … }

What is the exact sequence of events?

This error message seems to suggest a thread is panicking when you are syncing, it doesn’t have any context to do with adding a note/card.

Do you get this message when you are saving a note or can you create new notes on desktop Anki, but then you get this message when you try to sync?

Also for future reference please put error messages in backticks like this when posting to the forum. It makes them display nicer:

```
error message
```
2 Likes

I created some cards and try to add them in my Anki. I’ve done that literally millin times over the past 15 years. It starts as usual then it’s stuck. I waited for an hour and nothing so I colsed it and when I try to close my Anki this is the message I can see.

I import the same file to my husband’s deck it’s working. no problems. But not for me. I can’t undertsand what’s the problem because I can’t understand the error message. And another message appeared this time.

So just to confirm, is this what is happening?:

  1. Text Editor: Create notes in text file with comma separated values (CSV)
  2. Anki: Click File->Import... menu
  3. Anki: Select previously created text file
  4. Anki: Set import settings
  5. Anki: Click Import button
  6. Anki freezes while importing file
  7. Some time passes…
  8. (sometimes) Anki shows Error: 404: Invalid path: _anki/latestProgress message
  9. Anki: Try to close Anki
  10. Anki shows ... PoisonError { … } message.

But when you try to import the same file “to [your] husband’s deck” you have no issues.

When you say “my husband’s deck” is that on the same computer, on the same Anki profile or are any of these different?:

  • Computer
  • User Account
  • Anki Version
  • Anki Profile
2 Likes

Here’s what’s happening

  1. I create cards in my PC Anki (my database -I keep all cards there)
  2. create a new deck - put cards there
  3. export cards as Anki deck
  4. open another account (where I learn cards)
  5. import file
  6. it freezes
  7. I close import
  8. I syncronize and get the message (or two)

I’ve done that million times with me, my family and my students. But this time one account is not working.
I can import the same file to all other users but this one particular account isn’t working.
I can’t attach the file

Let me know if you need the file. I can import it everywhere except one account.
What does the error message say?

Julia

I’m afraid it may be quite difficult to solve exactly what is going on here.

Technical Discussion

It looks to me like the a thread doing the “import” task is acquiring a lock related to collection access, something goes wrong and the thread panics.
That collection lock then becomes poisoned because it was not released cleanly.
Anki fails to handle the panicked thread, so there is no error message shown in the UI and no more progress is made.

At a later point a “sync” task tries to acquire the same lock.
As the lock is poisoned it immediately returns an error.
This time Anki does some error handling (but cannot recover) and bubbles up the error message to the UI.

If you are lucky there may just be something slightly wrong with your collection that can be fixed by clicking Tools -> Check Database.
If it does fix things it means there is a bug somewhere in Anki, but at least your specific issue will be resolved.

If it does not fix things you should probably first update to Anki 25.02.
I cannot see any fixes in the changelog that would obviously be related, but it would be best if we are all working with the lastest version when troubleshooting in case there are any changes in behaviour between versions.

It could be useful to start Anki from the terminal, then try importing the deck.
Sometimes there are additional error messages that are printed to the terminal, but not shown in the graphical user interface:

Another thing that would be interesting to try would be to create a new Anki profile on the machine where you are currently having problems and try importing the deck into the clean profile.
This could help tell us if it is something wrong with Anki on your machine, or some weird interaction with the imported deck and the collection of your normal “learn” profile.

If there are no error messages in the terminal that make things obvious the next step would probably be you sharing your collection and the deck you are trying to import to see if someone else can reproduce the issue and debug what is going on.

I’m not sure what the recommended procedure is for sharing that data.
What do you normally ask people to do @Danika_Dakika ?

1 Like

What do you mean by “another account”? Are you switching to a different profile in the same install of Anki on your PC?

Again, is that other profiles that you have on this same install of Anki? Or are you importing it for those users on their systems?

  • Does it freeze before you get to the import options, or after you choose the import options and approve the import?
  • What import options are you choosing?
  • Are these completely new notes, or updates?

If this is specific to your profile, then the only variable here is your collection database in your studying profile. It sounds like your database is a bit under-the-weather. I join @rossgb in suggesting Check Database as a 1st step.

And after that, I’d suggest similar things (but I’d put them in this order) –
2. Run Anki in safe mode before you import – see the Troubleshooting Checklist – Troubleshooting - Anki Manual . If that doesn’t do it – run Anki in safe mode before you export too.
3. Run from the terminal – if there’s another hidden error we might catch it.

[These next 2 can go in either order, based on your level of enthusiasm about updating versions.]
4. Updating to the most recent version
5. Make a completely new studying profile for yourself. Export all of your decks as APKG, including scheduling and media, and import that into your new profile. [I’m saying APKG and include-media because I seem to recall there’s things COLPKG brings with that APKG doesn’t (but I might be wrong about that) – and because there’s a slight chance this is related to media, so leaving behind any unused media might help.]

For sharing the import file – I think you can send that by PM here to anyone who wants to give it a try.
For sharing the collection – If it’s synced to AnkiWeb, it’s usually easiest for someone with access (it’s a very short list) to grab the collection from there for testing. Let’s cross that bridge when we come to it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.