glutanimate / highlight-search-results

Highlight Search Results in the Browser add-on for Anki
https://ankiweb.net/shared/info/225180905
Other
13 stars 5 forks source link

[Highlight Search Results in the Browser][BUG] - Crashes with error when opening the browser screen since upgrading to Anki 2.1.42 (8eebfe18) #7

Open andrewcrook opened 3 years ago

andrewcrook commented 3 years ago

Which add-on is affected?

Highlight Search Results in the Browser

Prerequisite checklist

comment was posted on Anki page by other user

What is the problem/feature you would like to see fixed/implemented?

General fix so it works on Anki 2.1.42 (8eebfe18)

How can we reproduce the problem?

  1. update to Anki 2.1.42 (8eebfe18)
  2. Restart Anki
  3. open browser screen

Expected behavior: [ What you expected to happen ]

the browser screen to load and open.

Actual behavior: [ What actually happened ]

error dialogue with following

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, repeat 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.42 (8eebfe18) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-03-10 15:25:10

Caught exception:
Traceback (most recent call last):
  File "aqt/webview.py", line 36, in cmd
  File "aqt/webview.py", line 135, in _onCmd
  File "aqt/webview.py", line 580, in _onBridgeCmd
  File "aqt/toolbar.py", line 169, in _linkHandler
  File "aqt/toolbar.py", line 187, in _browseLinkHandler
  File "aqt/main.py", line 1067, in onBrowse
  File "aqt/__init__.py", line 101, in open
  File "aqt/browser.py", line 475, in __init__
  File "<decorator-gen-4>", line 2, in setupSearch
  File "anki/hooks.py", line 89, in decorator_wrapper
  File "anki/hooks.py", line 81, in repl
TypeError: onSetupSearch() takes 1 positional argument but 3 were given

Reproducible?: [ Can you reliably reproduce the issue by following the steps above? ]

Yes I have restarted I have also disabled all other addons

Version information

Anki 2.1.42 (8eebfe18) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2

System

macOS Big Sur 11.2.3 (20D91) MacBook Pro with M1 SoC 16GB

glutanimate commented 3 years ago

Hey Andrew, Thanks a bunch for the detailed report! The add-on now lives in a different GitHub page, so I've moved it here.

Regarding the issue: I just pushed an update to AnkiWeb that should hopefully address this

Please give it a try and let me know if it works for you!

(Also, if you haven't already, please do consider leaving a thumbs-up for the add-on if you enjoy it. It really helps with getting the word out there and making it easier to find for other users. Thanks!)