jdlorimer / incremental-reading

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

“<class 'IndexError'>: list index out of range” when extracting #37

Closed aleksejrs closed 6 years ago

aleksejrs commented 6 years ago
Error 
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. 
If the issue only occurs when add-ons are enabled, please use the Tools>Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. 
When you've discovered the add-on that is causing the problem, please report the issue on the add-ons section of our support site. 
Debug info:
Anki 2.1.0beta23 Python 3.6.2 Qt 5.9.2 PyQt 5.9
Platform: Linux
Flags: frz=True ao=True

Caught exception:
  File "/home/fc/.local/share/Anki2/addons21/1152164089/text.py", line 84, in create
    newNote.cards()[0], SCHEDULE_EXTRACT)
<class 'IndexError'>: list index out of range
aleksejrs commented 6 years ago

When I then undo, it appears to restore the background color only, keeping the highlighted foreground.

jdlorimer commented 6 years ago

What were you doing when the error occurred? I can't seem to replicate this. Presumably the only way to get this error is to create a note with no cards - but I can't think of when that might happen.

aleksejrs commented 6 years ago

I select a piece of text on any IR3 card and press x.

aleksejrs commented 6 years ago

If "Edit Extracted Note" is selected, this error window is covering an Add window with all the right data filled in. If "Enter Title only" is selected, the "Extract Text — Enter title" window appears, then the error appears only if I cancel that window and not confirm the title.

jdlorimer commented 6 years ago

Thanks. This should be fixed now.