Liresol / anki-custom-shortcuts

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

custom shortcut related error #187

Open Augustus-Carlsen opened 1 year ago

Augustus-Carlsen commented 1 year ago

I stopped using anki for a few months after my exams but I have recently gotten back into it so I'm not sure when exactly did this error start happening. My anki is 2.1.54 Qt5 version. I'm not sure what exactly the error does, but here's the issue anki kept on showing me:

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.54 (b6a7760c) Python 3.9.7 Qt 5.15.2 PyQt 5.15.5 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-09-13 14:16:18

Caught exception: Traceback (most recent call last): File "aqt.webview", line 42, in cmd File "aqt.webview", line 149, in _onCmd File "aqt.webview", line 624, in _onBridgeCmd File "aqt.toolbar", line 168, in _linkHandler File "aqt.toolbar", line 183, in _addLinkHandler File "aqt.main", line 1135, in onAddCard File "aqt", line 129, in open File "aqt.addcards", line 56, in init File "aqt.hooks_gen", line 133, in call File "C:\Users\User\AppData\Roaming\Anki2\addons21\24411424\custom_shortcuts.py", line 827, in inject_shortcut qconnect(shortcut.activated, self.reject) AttributeError: 'AddCards' object has no attribute 'reject'

Liresol commented 1 year ago

Hello, I think I know the root cause of this issue, but just to make sure, when are you encountering this? To me it would make sense if you're seeing this when trying to add cards, but let me know if you're seeing this anywhere else, such as right when Anki starts.

Liresol commented 1 year ago

Actually, I was able to reproduce the issue and I have pushed out an update to fix it. However, if you do still see it (or encountered it in contexts other than adding a card), please let me know and I will look into it further.

Augustus-Carlsen commented 1 year ago

I got the message when I opened anki for a few times, then it would give me this same message when I tried to add cards. Anyways I just updated the add on, hopefully it solve the problem. Thank you so much :D