kaegi / MorphMan

Anki plugin that reorders language cards based on the words you know
Other
262 stars 66 forks source link

Anki 2.1.26 Recalc error #123

Closed SaraSmiseth closed 4 years ago

SaraSmiseth commented 4 years ago

After updating to 2.1.26 recalc does not work for me anymore. First I had the same error as #116 but after #121 was merged I get another error. EDIT: It actually was PR #119 that broke it.

I have the latest version from master: https://github.com/kaegi/MorphMan/commit/25dff47c2ef84f7a03ac29000d88e7adaa719c5c.

Debug info:
Anki 2.1.26 (arch-linux-2.1.26-1) Python 3.8.2 Qt 5.14.2 PyQt 5.14.2
Platform: Linux
Flags: frz=False ao=True sv=1
Add-ons, last update check: 2020-05-18 06:23:11
Add-ons possibly involved: ⁨MorphMan⁩

Caught exception:
Traceback (most recent call last):
  File "/home/sara/.local/share/Anki2/addons21/MorphMan/__init__.py", line 14, in onMorphManRecalc
    main.main()
  File "/home/sara/.local/share/Anki2/addons21/MorphMan/morph/main.py", line 447, in main
    knownDb = updateNotes(allDb)
  File "/home/sara/.local/share/Anki2/addons21/MorphMan/morph/main.py", line 289, in updateNotes
    focusMorphIndex = frequency_list[focusMorphString]
TypeError: list indices must be integers or slices, not str
SaraSmiseth commented 4 years ago

Fixed by enhanced frequency.txt support: https://github.com/kaegi/MorphMan/commit/e2834e66d023b4845da68cf1ee6a4b17f74f5693