ijgnd / anki21__editor_add_hyperlink

5 stars 7 forks source link

Error when right-clicking during practice #14

Closed GrimPixel closed 2 years ago

GrimPixel commented 2 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-on support site. Debug info: Anki 2.1.50 (81cc5a09) Python 3.10.2 Qt 5.15.2 PyQt 5.15.6 Platform: Linux Flags: frz=False ao=True sv=2 Add-ons, last update check: 2022-02-06 03:44:20 Add-ons possibly involved: ⁨Add Hyperlink⁩

Caught exception: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 311, in contextMenuEvent gui_hooks.webview_will_show_context_menu(self, m) File "/usr/lib/python3.10/site-packages/aqt/hooks_gen.py", line 4257, in call anki.hooks.runHook("AnkiWebView.contextMenuEvent", webview, menu) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 34, in runHook func(*args) File "/home/grim/.local/share/Anki2/addons21/318752047/add_hyperlinks.py", line 162, in reviewer_context_menu context_request = view.lastContextMenuRequest() AttributeError: 'MainWebView' object has no attribute 'lastContextMenuRequest'

ijgnd commented 2 years ago

thanks for this report.

I will upload a fixed version in the next days. this is the second part where I removed the support for pyqt5 by accident and when fixing your last report I didn't think of the reviewer.

After getting the update in a few days and having restarted. If you still have the problem let me know.

To manually undo it check the last change at the bottom of this commit: https://github.com/ijgnd/anki21__editor_add_hyperlink/commit/98946f928e347ef9a27562dcb2f21a2abbe6476f#diff-8c461d46ac885e4ab1d605b2b2c7843243c6b637db34cbe32a535e9056c881eeL157

I'll re-add the removed code with an if .. else loop.

GrimPixel commented 2 years ago

Looks like problem solved.