kaegi / MorphMan

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

cannot import name 'gui_hooks' #153

Open GabbyNEW opened 4 years ago

GabbyNEW commented 4 years ago

Debug info: Debug info: Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=True sv=1

Addons installed: AnkiConnect Frozen Fields Japanese Support MIA Dictionary MIA Japanese MIA Retirement

Caught exception: File "aqt\progress.py", line 72, in handler File "aqt\main.py", line 99, in setupProfileAfterWebviewsLoaded File "aqt\main.py", line 136, in setupProfile File "", line 2, in loadProfile File "anki\hooks.py", line 74, in decorator_wrapper File "anki\hooks.py", line 69, in repl File "aqt\main.py", line 276, in loadProfile File "anki\hooks.py", line 29, in runHook File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\preferences.py", line 7, in init_preferences _init_config_py() File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\preferences.py", line 30, in _init_config_py from . import config File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631__init.py", line 87, in main() File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\init__.py", line 81, in main from .morph.browser import browseMorph File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\browser\browseMorph.py", line 6, in from ..newMorphHelper import focus, focusName File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\newMorphHelper.py", line 14, in from . import main File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\main.py", line 15, in from . import stats File "C:\Users\Gabby\AppData\Roaming\Anki2\addons21\900801631\morph\stats.py", line 7, in from aqt import toolbar, gui_hooks <class 'ImportError'>: cannot import name 'gui_hooks'

saifahn commented 4 years ago

I have a similar problem but it's this instead:

from . import stats
File "/Users/USER/Library/Application Support/Anki2/addons21/900801631/morph/stats.py", line 77, in <module> gui_hooks.top_toolbar_did_init_links.append(on_top_toolbar_did_init_links)
AttributeError: module 'aqt.gui_hooks' has no attribute 'top_toolbar_did_init_links'

So it seems like gui_hooks is actually imported?

Addons

AnkiConnect Japanese Support MeCab UniDic Japanese Dictionary MorphMan for Anki 21

landonepps commented 4 years ago

It looks like you'll need to update Anki to use the new version. I didn't realize it was incompatible with 2.1.15. I'll set the correct version on AnkiWeb.