Arthur-Milchior / anki-enhanced-cloze

GNU General Public License v3.0
2 stars 1 forks source link

Not Working: name 'DEFAULT_ANKI_CLOZE' is not defined #12

Open Steven-AA opened 5 years ago

Steven-AA commented 5 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.14 (7b93e985) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
  File "aqt\webview.py", line 27, in cmd
  File "aqt\webview.py", line 87, in _onCmd
  File "aqt\webview.py", line 368, in _onBridgeCmd
  File "<decorator-gen-56>", line 2, in _linkHandler
  File "anki\hooks.py", line 74, in decorator_wrapper
  File "anki\hooks.py", line 71, in repl
  File "C:\Users\Steve\AppData\Roaming\Anki2\addons21\review_heatmap\links.py", line 74, in heatmapLinkHandler
    return None if not _old else _old(self, url)
  File "aqt\overview.py", line 37, in _linkHandler
  File "aqt\main.py", line 485, in moveToState
  File "aqt\main.py", line 515, in _reviewState
  File "aqt\reviewer.py", line 46, in show
  File "aqt\reviewer.py", line 96, in nextCard
  File "aqt\reviewer.py", line 172, in _showQuestion
  File "aqt\reviewer.py", line 156, in _mungeQA
  File "aqt\reviewer.py", line 304, in typeAnsFilter
  File "C:\Users\Steve\AppData\Roaming\Anki2\addons21\1933645497\handler.py", line 76, in typeAnsQuestionFilter
    return re.sub(ref.typeAnsPat, DEFAULT_ANKI_CLOZE % (ref.typeFont, ref.typeSize), buf)
<class 'NameError'>: name 'DEFAULT_ANKI_CLOZE' is not defined

I have tried to delete the card type and reinstall the add-on, still not working

ijgnd commented 4 years ago

The output you posted refers to "C:\Users\Steve\AppData\Roaming\Anki2\addons21\1933645497\handler.py" in the last line.

The add-on with the number "1933645497" is Fill the blanks - Multiple type:cloze support.

I'm not sure how this refers to "Enhanced Cloze". Is this an interaction with "enhanced cloze"? Does this problem occur if you only have these two add-ons activated? What are the exact steps to reproduce?