Bug Report: Import error when opening Anki

Hi team,

After the most recent AnkiHub add-on update, an error message seen in this post prompted users to delete and re-install the add-on. Since doing that, both syncing and making submissions via add-on appears to be disabled as seen in the linked posts.

Iā€™ve decided to make an official report here with all the information for your convenience.

I was able to replicate this consistently on video (uploaded here)

The two error messages in the video I have attached as .rtf files (in zip) for your convenience. Let me know if AnkiHub logs will also be useful.
Error Messages.zip (23.8 KB)

Priority: Very High

6 Likes

If you didnā€™t get any error messages yet and have an add-on version greater or equal to 2023-02-17.2 and lower than 2023-02-19.1 (the version can be seen in Anki main window ā†’ AnkiHub ā†’ Help ā†’ Version), do this to prevent the error from happening:

  • donā€™t update the add-on when Anki tells you about an update
  • disable the AnkiHub add-on
  • restart Anki
  • update the add-on
  • enable the add-on
  • restart Anki

Once you do this you wonā€™t get the error.

If you have already deleted and re-installed the add-on and canā€™t sync with AnkiHub or canā€™t create suggestions you just have to re-subscribe to decks from the add-on (main Anki window ā†’ AnkiHub ā†’ Subscribed Decks).

If you get an error like this when opening Anki do this:
There is a new add-on update with a fix for this problem. Unfortunately you will not be able to update the add-on the normal way and the add-on will have to re-download all decks you are subscribed to from AnkiHub.

Installation instructions:

  • disable the AnkiHub add-on
  • restart Anki
  • delete the AnkiHub add-on
  • install the add-on, this is the add-onā€™s code: 1322529746 (See AnkiHub - AnkiWeb).
  • restart Anki
  • re-subscribe to your decks from the add-on
7 Likes

Hi @jakub.f, thank you for your response! I usually get my error message when I click sync toward the end of my study session and about the exit the app. Would I then follow along with the second part of your suggestion by deleting and re-subscribing to AnkiHub?

Will resubscribing to the decks lose the material contained in my protected fields? Asking this because resubscribing, I get the message that says, ā€œWould you like to proceed with downloading and installing the deck? Your personal collection will be modified.ā€

Not if those fields are protected within AnkiHub - if you are referring to your lecture notes or missed questions, you will be okay as you have those protected properly.

1 Like

It wonā€™t hurt to try the fix and see if your error still persists

1 Like

Just for peace of mind: I ended up resubscribing to the deck and didnā€™t have any major issues. Had some new cards, but I am pretty sure those were probably just from the updates that I have missed over the last day or two. Just make sure to protect your fields and check your media.

2 Likes

How can we mitigate this in the future?
I keep telling people about Anki! I noticed most of them have no energy (lazy) refuse to learn how to use Anki! keep recommending the Buttler and the subscriptionsā€¦ However, as soon as they face an add-on bug/problem, they whine about Anking/Anki not working properly and being full of bugs! Most of them donā€™t understand what they are talking about or what is an add-on lol. That being said, is there a way to make their experience (or in general any subscriber/user experience) seamless ?
In other words, can we test any update in an isolated way to see if it functions properly with no errors before updating? maybe creating an add-on that would internally test updates and if it works properly then update it/ if it doesnā€™t work properly it would send an automated message to the creator to modify accordinglyā€¦ ?
IF anyone else has a suggestion of how we can avoid this in the future please contribute so we can make ANKI-user-experience better for everyone!
@jakub.f @dollajas

I am subscribed to school-specific optional tags. Will my progress be lost on these if I unsubscribe and resubscribe to the deck? I selected everything under the protected fields option on ankihub.

Nope! Optional tags will always act as a protected field and will only change if the owner or maintainer of that tag group approves those changes.

Deleting a specific card will also remove the tag, but reimporting and resyncing with the optional tag group in that scenario would restore the tags to the state that they are in on AnkiHub

1 Like

Unfortunately, Anki is just very difficult to thoroughly test in an automated fashion and there are a lot of moving parts between Anki, the AnkiHub add-on, and the AnkiHub web app. We have tons of tests that run after every single change we make that help us feel confident in publishing new updates frequently. But there is a trade-off we have consciously made between spending more time on developing new features vs focusing on stability and a smooth user experience. Now that we are closer to where we want to be in terms of functionality, we will have more time to focus on stability and polishing the user experience. Our goal is definitely to develop an extremely solid user experience that ā€œjust works,ā€ for everyone, including people who arenā€™t super tech savvy. Building this product with extremely limited resources has been tough, but we are working on it. TL;DR, we totally hear you and are painfully aware of the issues and are working on it!

3 Likes

Hey Jakub,

Thanks for informing us about the issue. I had a question however, whenever I resubscribed to the Anking deck (after disabling the add on, restarting anki, deleting the add on, reinstalling it, and resubscribing) it placed 250 new cards into a new Anking (Ankihub deck). Essentially I am confused because I could easily just suspend those 250 cards and then move those 250 cards into my original Anking deck and delete the Anking (Ankihub) deck but I am not sure if it would effect syncing my deck with Ankihub.

I have attached a screenshot below detailing what I am seeing. Thanks for you help in advance!

Screenshot 2023-02-24 at 06.23.55

Yes, you can do that, just do one additional thing: open the Subscribed Decks dialog (main Anki window ā†’ AnkiHub ā†’ Subscribed Decks), select the AnKing Overhaul deck from the list of decks and use the Set Home deck button to set your original AnKing Overhaul deck as the Home deck. This Home deck is the deck that new cards will be added to (for this AnkiHub deck). If you donā€™t do that, every time new cards are synced, the deck with ā€œ(AnkiHub)ā€ at the end will be created and the cards will be added to it.

Iā€™m also not sure if you want to suspend the notes that currently are in the deck with "(AnkiHub) at the end. They are notes that were added to the deck recently so you might want to keep the active instead of suspended.

Explanation for why the add-on created the additional deck (if you want to know): When the add-on installs a new deck, it looks for existing notes in other decks. If there is one deck that contains notes that overlap with notes from the new deck, all notes from the new deck will be put into this existing deck. If there are multiple such decks, the add-on will create a new deck and put the new cards into it.

Bravo! Thanks for the really well written explanation detailing why the add-on does what it does. All issues have now been fixed!

I suspended the cards because I am currently only using Anking for missed UWorld questions so it doesnā€™t make sense to review things I havenā€™t missed.

I did have one more tangential question. While I was changing the home deck I noticed that there is an ā€œenable subdecksā€ option. I know in the past, Anki used to have subdecks for Step 1/2 etc. Is there a way to bring that back? I pressed the enable subdecks button and nothing happened.

1 Like

Enabling subdecks only works for decks with AnkiHub_Subdeck tags (these tags indicate which subdeck a note belongs to). There is a short tooltip about this when you hover your mouse over the Enable Subdecks button.
The AnKing Overhaul doesnā€™t have these tags yet, but we are planning on adding them in the future.

You can read more about the subdecks feature here: https://www.notion.so/ankipalace/AnkiHub-Documentation-dd8584f3e6c04068ab47e072c17b3a0a?pvs=4#009f8adc074a4883aeed37541699e593.

Hi @jakub.f , I tried all the suggested ways so I can hopefully stop getting the error message but It has been persisting and sometimes I need to force a full sync in the preference window.

I have uploaded my error logs in the hopes that it may be helpful.

ankihub_addon_logs_e2191_1677470772.log

Is there anything else I can try?

I can see from the logs that you are already on the newest available add-on version and that you are getting a different error. This error is tracked here: School deck added has Anking cards, error syncing Anking after - #20 by Montymole.

We are still working on a solution for it, but you can disable automatic syncing with AnkiHub in the add-on settings to prevent the error from showing up when you sync with AnkiWeb. Hereā€™s how to do that: School deck added has Anking cards, error syncing Anking after - #21 by jakub.f

1 Like

Thank you!!

I have this issue too. If I do this, will my deck change the learning steps and when I see them? Iā€™m so afraid to delete the add-on and re-subcribe to the deck from AnkiHub and have it all change! Please advise.

I didnā€™t have to do the last step: * re-subscribe to your decks from the add-on

After going onto the AnkiHub page, it showed that I was still subscribed to the deck (AnKing-MCAT). It no longer is showing the add on error. I guess Iā€™m ok, right?