kaegi / MorphMan

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

2.1.50 No attribute "deck_overrides" #269

Open ghost opened 2 years ago

ghost commented 2 years ago

Getting this error in Qt6 and Qt5 builds:

Error during startup: ⁨Traceback (most recent call last):
  File "aqt.main", line 165, in __init__
  File "aqt.main", line 217, in finish_ui_setup
  File "aqt.toolbar", line 48, in draw
  File "aqt.toolbar", line 133, in _centerLinks
  File "aqt.hooks_gen", line 3988, in __call__
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/stats.py", line 69, in on_top_toolbar_did_init_links
    name, details = getStatsLink()
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/stats.py", line 52, in getStatsLink
    d = loadStats()
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/stats.py", line 19, in loadStats
    f = gzip.open(getStatsPath())
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/stats.py", line 14, in getStatsPath
    def getStatsPath(): return cfg('path_stats')
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/preferences.py", line 26, in get_preference
    return _get_config_py_preference(key, model_id, deck_id)
  File "/home/yaoberh/.local/share/Anki2/addons21/900801631/morph/preferences.py", line 71, in _get_config_py_preference
    if key in config_py.deck_overrides.get(deck, []):
AttributeError: 'NoneType' object has no attribute 'deck_overrides'
ianki commented 2 years ago

Thanks. I'll add a label for Anki 2.1.50 issues.

mosic commented 2 years ago

I got the same error when I tried upgrading from Anki 2.1.49 to 2.1.51, but then I tried 2.1.50 and didn't get any errors, FWIW.