Liresol / anki-custom-shortcuts

Custom Keyboard Shortcuts for Anki 2.1
MIT License
62 stars 14 forks source link

Error when starting reviewing #68

Open bradydjohnson opened 4 years ago

bradydjohnson commented 4 years ago

Got the following error. When I disabled this add-on & restarted Anki, the error no longer happened.

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.23 (de9543ff) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1 Platform: Mac 10.15.4 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2020-04-27 15:31:59 Add-ons possibly involved: ⁨Customize Keyboard Shortcuts, Web Browser - Search terms Import texts and images automatically, Cloze Overlapper, Review Heatmap⁩

Caught exception: Traceback (most recent call last): File "aqt/webview.py", line 31, in cmd File "aqt/webview.py", line 97, in _onCmd File "aqt/webview.py", line 500, in _onBridgeCmd File "</Applications/Anki.app/Contents/MacOS/decorator.pyc:decorator-gen-114>", line 2, in _linkHandler File "anki/hooks.py", line 666, in decorator_wrapper File "anki/hooks.py", line 663, in repl File "/Users/bradyjohnson/Library/Application Support/Anki2/addons21/review_heatmap/links.py", line 74, in heatmapLinkHandler return None if not _old else _old(self, url) File "aqt/overview.py", line 67, in _linkHandler File "aqt/main.py", line 588, in moveToState File "aqt/main.py", line 619, in _reviewState File "aqt/reviewer.py", line 51, in show File "</Applications/Anki.app/Contents/MacOS/decorator.pyc:decorator-gen-104>", line 2, in customShortcut File "anki/hooks.py", line 666, in decorator_wrapper File "anki/hooks.py", line 663, in repl File "/Users/bradyjohnson/Library/Application Support/Anki2/addons21/cloze_overlapper/reviewer.py", line 63, in onShortcutKeys21 keys = _old(reviewer) File "/Users/bradyjohnson/Library/Application Support/Anki2/addons21/864545277/review_controller.py", line 118, in customShortcut sList = fn(self) File "/Users/bradyjohnson/Library/Application Support/Anki2/addons21/24411424/custom_shortcuts.py", line 156, in cs_review_setupShortcuts dupes.append((config_scuts["reviewer _duplicates"][scut],self.sToF(scut))) File "/Users/bradyjohnson/Library/Application Support/Anki2/addons21/24411424/cs_functions.py", line 69, in review_sToF return sdict[scut] KeyError: 'main deckbrowser'

If it helps, I tried to add Esc to the reviewer duplicates so I could hit Escape from full-screen reviewing. I don't know if that's related or not.

    "reviewer _duplicates": {
        "main deckbrowser": "Esc",
        "reviewer choice 1": "j",
        "reviewer choice 2": "k",
        "reviewer choice 3": "l",
        "reviewer choice 4": ";"
    },
Liresol commented 4 years ago

Hello, Right now, main doesn't have duplicates and reviewer _duplicates will only work with reviewer shortcuts.

I'm not planning to change the latter, but I can try to add duplication functionality to main if that's preferred.