Error when pressing enter in search while holding shift key
Opened this issue · 1 comments
Problem description
When I search and hit the search button while still holding down the shift key (from the search for example) I get an error message. The Addon still works fine, it is just annoying. Not high priority.
Checklist
Please replace the space inside the brackets with an x if the following items apply:
- [ x] I've restarted Anki to see if it helps
- [ x] I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
- [ x] I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
- [x ] I've tried to disable other add-ons to see if there are any interactions present
- [ x] My issue disappears when I hold shift while starting Anki.
- [x ] I've checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.
Information about your Anki set-up
Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):
Anki 2.1.61 (0c1eaf4c) Python 3.9.15 Qt 6.4.2 PyQt 6.4.0
Platform: Windows-10-10.0.19044
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-04-19 10:51:58
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AMBOSS add-on ['0amboss_addon', 2022-06-27T18:14, 'None', mod]
Add Table ['1237621971', 2022-12-21T12:20, 'None', mod]
Add tagmove card in review ['647335063', 2020-06-12T12:32, 'None', '']
Advanced Browser ['874215009', 2022-09-27T02:28, 'None', '']
BetterSearch ['1052724801', 2023-03-19T19:48, 'None', '']
Colorful Tags Hierarchical Tags ['594329229', 2022-09-15T17:06, 'None', '']
Copy notes ['1566928056', 2021-12-24T20:56, 'None', '']
Customize Keyboard Shortcuts ['24411424', 2022-09-14T11:12, 'None', mod]
Deck name in title 21 ['699175524', 2019-06-01T03:05, 'None', '']
Highlight Search Results in the Browser ['225180905', 2021-03-10T18:06, 'None', '']
Ignore accents in browser search ['1924690148', 2020-11-28T12:29, 'None', '']
Image Occlusion Enhanced ['1374772155', 2022-04-09T09:15, 'None', '']
ImageResizer ['1214357311', 2022-07-15T15:05, 'None', '']
Review Heatmap ['1771074083', 2022-06-30T03:43, 'None', '']
Search in formatted text in any fields ['1126516755', 2021-10-16T19:37, 'None', '']
Set Font Size ['651521808', 2022-05-01T20:02, 'None', mod]
Straight Reward ['957961234', 2022-12-12T14:49, 'None', '']
Symbols ['1461102936', 2019-04-18T22:21, 'None', mod]
===IDs of active AnkiWeb add-ons===
1052724801 1126516755 1214357311 1237621971 1374772155 1461102936 1566928056 1771074083 1924690148 225180905 24411424 594329229 647335063 651521808 699175524 874215009 957961234
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Notion Toggles Loader ['1940767534', 2023-04-09T20:24, 'None', mod]
Error message (if any)
If you've received an error message, please copy and paste it between the backticks below:
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 to the add-on author.
Debug info:
Anki 2.1.61 (0c1eaf4c) Python 3.9.15 Qt 6.4.2 PyQt 6.4.0
Platform: Windows-10-10.0.19044
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2023-04-19 10:51:58
Caught exception:
Traceback (most recent call last):
File "E:\Bibliotheken\Eigene Bibliotheken\Anki2\addons21\225180905\browser.py", line 146, in
lambda: select_next_matching_card(browser)
File "E:\Bibliotheken\Eigene Bibliotheken\Anki2\addons21\225180905\browser.py", line 116, in select_next_matching_card
_set_card_selection(browser, [next_cid])
File "E:\Bibliotheken\Eigene Bibliotheken\Anki2\addons21\225180905\browser.py", line 127, in _set_card_selection
browser.model.restoreSelection()
AttributeError: 'MockModel' object has no attribute 'restoreSelection'
Thanks for the report! Can confirm this.