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
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 { … }
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.
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
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 ?
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.