remiberthoz / anki-periodic-table-memory-pegs

Periodic Table flashcard deck for Ankl
https://ankiweb.net/shared/info/490209917
MIT License
51 stars 5 forks source link

Duplicate Element 105 | New (and completely different) entries are not generated properly #1

Closed ohare93 closed 4 years ago

ohare93 commented 4 years ago

Thanks for the deck, mate. Glad you got it over to a Github repo! 👍

I pulled the latest version, as you suggested. You mentioned that 105 has changed from Hahnium to Dubnium, however my local card did not change, instead I got a duplicate! 😱

Looking at the card info of each (Select the card in the Browser, then click Cards -> Info) gives this for each card.

Old

Added   2017-01-20
Position    879
Card Type   Card 3
Note Type   PeriodicTable-d75c0
Deck    Miscellaneous::Periodic table memory pegs
Note ID 1484952780480
Card ID 1484952780603

New

Added   1970-01-01
Position    1
Card Type   Card 3
Note Type   PeriodicTable-d75c0
Deck    Miscellaneous::Periodic table memory pegs
Note ID 105
Card ID 419

From this it's easy to see that the Note and Card IDs are not generated as proper Guids. The same is true for the new element 106

Added   1970-01-01
Position    2
Card Type   Card 3
Note Type   PeriodicTable-d75c0
Deck    Miscellaneous::Periodic table memory pegs
Note ID 106
Card ID 423

What I believe is the solution to this:

Thanks again for the deck mate 👍

remiberthoz commented 4 years ago

Hey! Thanks for the report.

I realise I made a mistake when updating element 105 from Hahnium to Dubnium. Anki compares notes based on a guid, which has to be conserved between updates. I failed to set the correct guid for element 105. I will fix this ASAP with a new commit and a release, but I need to figure a way to remove the duplicate.

Element 106 also as a guid set in the src/data.json file, which is imported into the sqlite3 database that you can browse by opening the .apkg file with a zip software. I do not know why Anki shows the Note ID field with a different value. I will explore this problem over the end of the week.

remiberthoz commented 4 years ago

Ok so commit 7bde7bf solves this issue partially. I will link to this comment as an update guide from version v2.1.


If you update from v2.1 to any later version, you need to manually remove the cards with Note ID 1484952780480. This cards are duplicates for Dubnium cards; so you will find them near Element 105 in the Anki cards browser. To see the Note ID of a card in the browser, right-click on a card and select Info.

remiberthoz commented 4 years ago

I spent more time on this issue today. As far as I can tell, the guid is the only value that is used to determine if imported cards are news or updates. Note ID and Card ID are internal to each Anki installation:

Thanks again to @ohare93 for reporting the issue. The guid has been fixed before, I think no more changes are required.