sviatoslav-lebediev / anki-quizlet-importer-extended

86 stars 10 forks source link

Standard error canceled due to error with "BackAudio" #101

Closed jjm4000 closed 1 year ago

jjm4000 commented 1 year ago

Describe the bug

Error when trying to import deck

Quizlet deck URL

https://quizlet.com/kr/267460356/sogang-4a-unit-2-flash-cards/

Additional context

Debug info: Anki 2.1.65 (aa9a734f) Python 3.9.15 Qt 6.5.0 PyQt 6.5.0 Platform: macOS-13.4-arm64-arm-64bit Flags: frz=True ao=True sv=2 Add-ons, last update check: 2023-06-26 16:09:54 Add-ons possibly involved: ⁨Quizlet to Anki 21 Importer with audio support⁩

Caught exception: Traceback (most recent call last): File "anki.notes", line 154, in _field_index KeyError: 'BackAudio'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/Users/name/Library/Application Support/Anki2/addons21/1362209126/init.py", line 373, in onCode self.createDeck(deck) File "/Users/name/Library/Application Support/Anki2/addons21/1362209126/init.py", line 435, in createDeck note["BackAudio"] = "[sound:" + file_name + "]" File "anki.notes", line 162, in setitem File "anki.notes", line 156, in _field_index KeyError: 'BackAudio'

sviatoslav-lebediev commented 1 year ago

Hi, 99% that's the same issue https://github.com/sviatoslav-lebediev/anki-quizlet-importer-extended/issues/71#issuecomment-1529112844 please take a look and let me know if it fixes your problem

jjm4000 commented 1 year ago

It did work, thank you so much! I think it's worth mentioning that renaming it also fixes the issue though, since it seems like deleting the note type deletes all cards under that type as well.

sviatoslav-lebediev commented 1 year ago

yep, I guess you are right. This is a note that the add-on creates and uses, so it should not be changed