noobj2 / Anki-Advanced-Review-Bottombar

An Anki add-on to customize different parts of Anki flashcards app.
GNU General Public License v3.0
59 stars 3 forks source link

Type error #31

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.1 Qt 5.15.2 PyQt 5.15.6 Platform: Linux Flags: frz=False ao=True sv=2 Add-ons, last update check: 2022-01-21 23:41:20 Add-ons possibly involved: ⁨Advanced Review Bottom Bar, Numeric Keypad Remapping ease bugs fixed, Replay buttons on card, Open linked pdf docx epub audiovideo etc in external Program⁩

Caught exception: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 41, in cmd return json.dumps(self.onCmd(str)) File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 148, in _onCmd return self._onBridgeCmd(str) File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 602, in _onBridgeCmd return self.onBridgeCmd(cmd) File "/usr/lib/python3.10/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), kw) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 89, in decorator_wrapper return repl(*args, *kwargs) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 86, in repl return new(_old=old, args, kwargs) File "/home/grim/.local/share/Anki2/addons21/879473266/reviewer.py", line 14, in myLinkHandler return _old(self, url) File "/usr/lib/python3.10/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), kw) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 89, in decorator_wrapper return repl(*args, *kwargs) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 86, in repl return new(_old=old, args, kwargs) File "/home/grim/.local/share/Anki2/addons21/879473266/linked__view.py", line 24, in myLinkHandler return _old(self, url) File "/home/grim/.local/share/Anki2/addons21/498789867/init.py", line 103, in review_link_handler_wrapper original_review_link_handler(reviewer, url) File "/home/grim/.local/share/Anki2/addons21/1136455830/Bottom_Bar.py", line 107, in linkHandler_wrap Review_linkHandelr_Original(reviewer, url) File "/usr/lib/python3.10/site-packages/aqt/reviewer.py", line 511, in _linkHandler self._answerCard(val) File "/home/grim/.local/share/Anki2/addons21/653807651/init.py", line 54, in newAnswerCard _oldAnswerCard(self, ease) File "/usr/lib/python3.10/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), kw) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 89, in decorator_wrapper return repl(*args, *kwargs) File "/usr/lib/python3.10/site-packages/anki/hooks.py", line 83, in repl new(args, kwargs) File "/home/grim/.local/share/Anki2/addons21/1136455830/Tooltip.py", line 550, in myTooltip showTooltip(text, background_color, tooltip_textColor, button_width, button_height, x_offset, y_offset, period=tooltip_timer) File "/home/grim/.local/share/Anki2/addons21/1136455830/Tooltip.py", line 588, in showTooltip lab.move(aw.mapToGlobal(QPoint(x_offset+(aw.width()-button_width)/2, y_offset+aw.height()))) TypeError: arguments did not match any overloaded call: QPoint(): too many arguments QPoint(int, int): argument 1 has unexpected type 'float' QPoint(QPoint): argument 1 has unexpected type 'float'

noobj2 commented 2 years ago

hi @sdvcrx has already fixed this but I had my exams and I wasn't able to update the add-on. I'll change some parts, add some features and if everything goes good I'll update the add-on in next few days.

sdvcrx commented 2 years ago
wget https://github.com/noobj2/Anki-Advanced-Review-Bottombar/raw/master/Tooltip.py -O ~/.local/share/Anki2/addons21/1136455830/Tooltip.py

Replacing Tooltip.py with latest version can temporarily fix this error. @GrimPixel Already fixed in #30

GrimPixel commented 2 years ago

Yes, it works now. Thanks.

noobj2 commented 2 years ago

Updated the add-on. So this bug is fixed now. Thank you again @sdvcrx