Several users have been reporting issues with this deck I uploaded:
ankiweb. net/shared/info/610839770
I generate the deck with Python’s genanki library. It’s supposed to follow a level structure, and when I load the apkg that I generate directly in Anki it does seem to work without any tweaks, I get level 1 cards, then level 2 etc… So I couldn’t reproduce the issue:
However today it occurred to me that I should probably try with the version downloaded from ankiweb (until now I always assumed the decks would be identical) and, lo and behold, that version does start at level 4 for some reason:
I have no idea what causes this behaviour. Is it a genanki quirk? Am I not setting something correctly? The “Sort Field” in the deck is the kanji character, but that doesn’t actually explain the discrepancy here because clearly the order used is not the kanji lexical order either.
Here’s the “raw” deck as I generate it, before it gets processed by ankiweb:
I haven’t downloaded your files to try them myself, but if the file you’re generating doesn’t have New-queue positions already, the cards will probably be positioned in order of your note-created timestamps. Have you looked at the “Due” column to compare those position numbers?
The other thing you should consider is the Options you’re using in your collection, and any Options you’ve included in the deck. Regardless of the New-queue positions, a different New card gather order can change what cards are introduced first.
[You can more effectively “obfuscate” your links just by putting them between backticks, in code blocks. That makes it easier for folks to simply copy-paste them.]
The “Due” value does appear to be the issue, if I sort by this column in the browser I do see the same order that’s used by the Anki scheduler when picking new lessons:
I presume that the #0 is the value I’m not setting correctly. What’s weird is that half the deck seems to have #0 there, but then the other half has non-zero values that make no sense to me:
We see the kanji 一 here that should be the very first in the deck have a value of #4941
I have no idea where this is coming from, I’ll have to check on the genanki side where and how these numbers are generated.
EDIT: although actually these numbers seem to be introduced by the ankiweb processing, if I look at the raw apkg I generate, everything is set to 0, in which case the scheduler seems to pick the cards in the order they’ve been inserted in the deck, which works:
I should still attempt to send the “Due” value explicitly, hopefully it’ll resolve the issue entirely, but I still think it’s a bit surprising that ankiweb makes these changes.
Ok, it was as simple as adding due=<some integer> when instantiating the genanki.Note.
Unfortunately it seems that Anki won’t update this value if importing over an existing version of the deck, only on first import, so people who are already using the deck are out of luck…
EDIT: actually this is super annoying because it means that I can’t update the version of the deck I actually use, which is also the one I share on ankiweb… So I don’t know how to resolve the issue without nuking my own progress.
I did a little searching, and “genanki” has been the cause of similar issues before. Someone should probably make sure the maintainer knows about this.
As far as updating the deck – you’re right that once a user has imported the deck, their own New-queue positions are what control. You can’t overwrite those with another import. You’ll have to include instructions for how to Reposition the cards correctly or use suspend/unsuspend to make sure the cards are introduced in the right order.
For your own collection – there are risks when you have the “shared” version of your deck also be the “study” version of your deck. Since you can only use Reposition on New cards, you may need to find a way to de-couple them. And you’ll have to be careful to make sure that the shared version continues to be update-able. [These are ideas that I haven’t experimented with, so please test them first, and use backups to protect your data.]
That could be –
Temporary – export your study deck to preserve your own progress, reset the shared deck to New so you can use Reposition, reshare the deck, and then import your own progress to re-update the deck.
Permanent –
For your study deck: export your study deck, import that into another profile so you can make it incompatible with updating and then import it into your main profile as a separate deck.
[Another option is to use your existing profile and AnkiWeb account for sharing, but create a 2nd profile and AnkiWeb account for your personal studying and import your entire collection there.]
For the shared deck: reset the deck to New so you can use Reposition, and reshare the deck.
That’s what I ended up doing (doing a backup, erasing my deck, loading the deck, syncing the deck with ankiweb, resharing on ankiweb, restoring backup, force-sync ankiweb). It’s of course less than ideal but I update it only a few times a year so I guess I’ll leave with it for the time being.
With the benefit of hindsight, I now realize that I should have used different accounts for the public sharing and the account I actually study on.
There’s still an unexplained thing though: if I don’t explicitly set the “Due” value with genanki, it defaults to 0 everywhere. This actually ends up working fine in my case because Anki defaults to (I presume) database insertion order in this case, which happens to be the correct order for my purpose.
But then why is ankiweb setting some of the “Due” values to be something else when I share the deck? I still feel like there’s a potential bug lurking in there.