ThoreBor / Anki_Leaderboard

Anki 2.1 Add-On
https://ankiweb.net/shared/info/41708974
MIT License
52 stars 11 forks source link

v1.7.0 Homescreen bug #145

Closed absoluteinc closed 3 years ago

absoluteinc commented 3 years ago

Describe the bug Opening Anki with Leaderboard add-on enabled shows an error pop-up and leaderboard no longer shows on homescreen. This happened after I updated to v1.7.0. I tried disabling and re-enabling add-on to no avail.

Screenshots 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.43 (0fbae6bc) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-06-16 11:30:28

Caught exception: Traceback (most recent call last): File "C:\Users\N\AppData\Roaming\Anki2\addons21\41708974__init.py", line 100, in background_sync leaderboard_on_deck_browser() File "C:\Users\N\AppData\Roaming\Anki2\addons21\41708974\lb_on_homescreen.py", line 258, in leaderboard_on_deck_browser DB.refresh() File "aqt\deckbrowser.py", line 72, in refresh File "aqt\deckbrowser.py", line 127, in _renderPage File "aqt\deckbrowser.py", line 136, in renderPage File "aqt\hooks_gen.py", line 995, in call File "C:\Users\N\AppData\Roaming\Anki2\addons21\41708974\lb_on_homescreen.py", line 121, in on_deck_browser_will_render_content lb = getData() File "C:\Users\N\AppData\Roaming\Anki2\addons21\41708974\lb_on_homescreen.py", line 75, in getData if config["tab"] == 3 and config["current_group"].replace(" ", "") in groups: AttributeError: 'NoneType' object has no attribute 'replace'

Steps to reproduce bug Open Anki with this add-on enabled.

Info

I am able to open config and change the settings and such. I am still logged in. However, it does not show on the main screen at all.

ThoreBor commented 3 years ago

Hi, thanks for letting me know. This looks like an easy fix. I think if you either change the default tab in Leaderboard>Config>Settings (to temporarily fix this) or join a group (Leaderboard>Config>Groups) it should fix the problem. After the update, you have to rejoin the group you previously joined, because I rewrote parts of the code and you can join multiple groups now.

absoluteinc commented 3 years ago

I tried changing the default tab and it worked. However, when I try to re-join my group, it says wrong password, when my group doesn't have a password.

ThoreBor commented 3 years ago

Could you tell me the name of the group?

absoluteinc commented 3 years ago

SGU Anki Peeps

ThoreBor commented 3 years ago

I just checked and SGU Anki Peeps is password-protected, but there is another group called 2021 SGU Anki Peeps which doesn't have a password.

absoluteinc commented 3 years ago

My apologies!! I meant to join the 2021 group, and didn't know there was another group with a similar name. I'm sorry! Thanks for your time!