jdlorimer / incremental-reading

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

Error when creating a new flashcard from an extract #68

Closed JJChill closed 6 years ago

JJChill commented 6 years ago

Debug info: Anki 2.1.0beta36 Python 3.6.1 Qt 5.9.2 PyQt 5.9 Platform: Windows 10 Flags: frz=True ao=True

Caught exception: File "C:/Users/Jevon/AppData/Roaming/Anki2\addons21\1081195335\main.py", line 169, in createNote addCards.editor.setNote(newNote) File "aqt\editor.py", line 293, in setNote File "aqt\editor.py", line 308, in loadNote File "anki\media.py", line 254, in escapeImages File "C:\Users\dae\AppData\Local\Programs\Python\Python36-32\lib\re.py", line 191, in sub <class 'TypeError'>: expected string or bytes-like object

This happens when I use the shortcut that I defined as below: image

jdlorimer commented 6 years ago

Please try deleting the add-on and reinstalling it. That error message doesn't make a lot of sense, since there is no code at line 169 in the current version.

JJChill commented 6 years ago

I did as you said but it looks like it's still pulling down the same code. I get the same error and I can see that main.py does not match the main.py on GitHub. I verified that the add-on was deleted before re-downloading. Does Anki cache an add-on download or anything?

_version.py has version = '4.7.14' which is definitely wrong...

jdlorimer commented 6 years ago

Sorry, it didn't occur to me that you're using the version on AnkiWeb.

Download the development version (here) and drop the files from ir into 1081195335, overwriting the existing ones.

Let me know if that fixes the issue.