CrowdAnki icon indicating copy to clipboard operation
CrowdAnki copied to clipboard

Incorrect JSON when exporting a deck containing cloned note types

Open tfiwm opened this issue 6 years ago • 3 comments

Details:

Say there are two note types type1 and type2 and type1 was cloned (anki feature while creating new note types) to create type2. Now create a deck ABC which has notes based on the two note type1 and type2. If you export deck ABC using CrowdANKI, the resulting JSON representation will have only one note type or one NoteModel. As a result all the notes in the JSON which were exported from deck ABC will have the crowdanki_uuid of this NoteModel as the note_model_uuid. Importing this JSON representation to Anki will eventually result in a crash. For whatever reason, crowdanki is assuming a cloned note type and its parent to be identical (?)

Anki Version 2.1.5 Qt 5.9.2 PyQt 5.9 Platform: Windows 10

tfiwm avatar Jan 13 '19 17:01 tfiwm

My immediate guess would be that note_model_uuid is copied when the note type is cloned, so CrowdAnki does not generate new uuid for it.
If it's the case, it'd be a bit tricky to fix. I think we'd need to check for duplicates at the export time or something like that.

Stvad avatar Jan 13 '19 17:01 Stvad

I have the same problem. The cloned note type replaces original note type in CrowdAnki JSON. It's a BIG problem! The deck could be easily corrupted (actually I did it).

magicprinc avatar Aug 28 '19 15:08 magicprinc

Me too, causes all sorts of trouble...

johnlawrenceaspden avatar Sep 01 '19 19:09 johnlawrenceaspden