jdlorimer / incremental-reading

Anki add-on providing incremental reading features
https://ankiweb.net/shared/info/935264945
ISC License
216 stars 38 forks source link

Issue with making Cards from an article #112

Open vood00-z opened 4 years ago

vood00-z commented 4 years ago

First and foremost, I want to say THANK YOU THANK YOU THANK YOU! I've been using the IR add-on to Anki for about 2 months and I don't know how I've learned anything prior to now. There is definitely a steep learning curve to properly using the software, but the ability to read articles on my computer and seamlessly shift to use my flashcards on my phone takes Anki to the next level.

Recently (in the past 2 weeks, but it wasn't doing this prior to then), I've been having an issue with making Cloze cards from my articles - I highlight the text I want, it pops up the card editor with the proper text and I can edit the text without issue. However, when I click "Add" or press Crtl+Enter to publish the new card, it pops up with the error message below. The most curious piece to me is that the cards are still created and the highlighting appears on my articles, but I cannot get the card editor to close. By the end of a session, I have about 25 card editors open that refuse to close due to the error messages. Please help - while this does not make the add-on nor Anki unusable, it is fairly irritating for something that worked seamlessly for the past month and a half.

Debug info: Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-08-12 19:50:49

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 464, in handler File "aqt\editor.py", line 475, in File "aqt\addcards.py", line 237, in afterSave File "aqt\editor.py", line 503, in fieldsAreBlank IndexError: list index out of range

s609078902 commented 3 years ago

I find the issue take places when I marked the option "Edit Extracted Note" so I guess the reason is there is a field in IR3 can't be matched to the normal note type, e.g. source field and priority field. I also discover, when the issue occurs, the Note type will be switched to the IR3 without the change of the name on the botton.(you can verify this by clicking the Type botton when the issue happens)

There are some methods to ease it(some I tried and some are my thoughts):

  1. To unmark the option "Edit Extracted Note".(I tried)
  2. To add a field named source to the normal Note Type, and maybe a priority field too if your scheduling mode is priorities.(I guess)
  3. To change the Note Type to a normal Note type When the issue occurs, and then you can close the window normally.(I tried)
s609078902 commented 3 years ago

I find the issue take places when I marked the option "Edit Extracted Note" so I guess the reason is there is a field in IR3 can't be matched to the normal note type, e.g. source field and priority field. I also discover, when the issue occurs, the Note type will be switched to the IR3 without the change of the name on the botton.(you can verify this by clicking the Type botton when the issue happens)

There are some methods to ease it(some I tried and some are my thoughts):

  1. To unmark the option "Edit Extracted Note".(I tried)
  2. To add a field named source to the normal Note Type, and maybe a priority field too if your scheduling mode is priorities.(I guess)
  3. To change the Note Type to a normal Note type When the issue occurs, and then you can close the window normally.(I tried)

Updated: It's seemed that change the Note Type to IR3 can solve this problem.