Closed ghost closed 4 years ago
the output you posted doesn't mention "enhanced cloze" - instead it refers to the addon with the id "1374772155" which is Image Occlusion Enhanced for Anki 2.1 (alpha).
Disable all add-ons apart from "Numeric Keypad" and "Enhanced Cloze". Then restart. Does the problem persist? If not, the problem is with other add-ons.
@ijgnd Sorry for the late response. Threw the following with all other addons disabled. Anki 2.1.17 (81bdd860) Python 3.8.0 Qt 5.14.0 PyQt 5.13.2 Platform: Windows 10 Flags: frz=True ao=True sv=2
Caught exception: Traceback (most recent call last): File "C:\Users\John Smith\AppData\Roaming\Anki2\addons21\653807651__init.py", line 118, in answerCaller return onAnswerButton(int(closureKey)) File "C:\Users\John Smith\AppData\Roaming\Anki2\addons21\653807651\init__.py", line 90, in onAnswerButton self.mw.reviewer._showAnswer() File "aqt\reviewer.py", line 217, in _showAnswer File "aqt\reviewer.py", line 156, in _mungeQA File "aqt\reviewer.py", line 306, in typeAnsFilter File "aqt\reviewer.py", line 367, in typeAnsAnswerFilter File "aqt\reviewer.py", line 431, in correct File "aqt\reviewer.py", line 400, in tokenizeComparison TypeError: normalize() argument 2 must be str, not None
It's been a long time. As far as I remember "Enhanced Cloze" doesn't affect the reviewer.
Does the problem occur if you disable "Enhanced Cloze" (and all other add-ons) and only use "Numeric Keypad"? If so you should report this to the creator of the "Numeric Keypad" add-on.
If this disappears: Enable all your other add-ons except for "Enhanced Cloze". So use "numceric keypad" with "Image Occlusion". If the problem persists you should report this to the creator of the "Numeric Keypad" add-on.
If the problem only occurs when "Enhanced Cloze" is enabled: Does it always occur or just for some cards from certain note types? If so it would help if you could offer more details and share an note that creates this problem. In this case maybe also ask the creator of the "Numeric Keypad" add-on who knows a lot about Anki.
In order 1: No 2: Problem disappears 3: Problem only occurs with an Enhanced Cloze card type as demonstrated in this gif To add context, I'm pressing the 3 button repeatedly.
should be this: the problem is in "numeric keypad" and has nothing to do with "enhanced cloze".
Make a new profile, then add a "Basic (type in the answer)" note and review the card created from it. Don't type anything into the text field, just press "3". Then I get your error.
The error should disappear if if you change line 90 in "numeric keypad" from self.mw.reviewer._showAnswer()
to self.mw.reviewer._getTypedAnswer()
-the latter seems to be what the reviewer calls, see https://github.com/dae/anki/blob/master/aqt/reviewer.py#L277 and https://github.com/dae/anki/blob/master/aqt/reviewer.py#L291.
When you use the default "numeric keypad" this crucial line is not evaluated: https://github.com/dae/anki/blob/master/aqt/reviewer.py#L473
Can you reproduce the "numeric keypad" bug without other add-ons and does my fix has any side effects?
It works! I could reproduce the bug and your fix does not appear to have any side effects as far as I can see. Thank you so much for your time.
Addon seems to interfere with the "show answer using numerical keys" function of Numeric Keypad Remapping throwing the following error