ThoreBor / Anki_Leaderboard

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

Unable to open leaderboard #175

Closed theymom closed 1 year ago

theymom commented 2 years ago

I had just deleted an old account and signed up for a new one using the same email address. The new account name is "theymom". However, after logging in to the new account, I get this message pop up that gives an error. I have tried doing what the message says but it still hasn't been resolved.

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.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.16 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-04-22 20:08:09 Add-ons possibly involved: ⁨Leaderboard⁩

Caught exception: Traceback (most recent call last): File "/Users/m1air/Library/Application Support/Anki2/addons21/41708974/init.py", line 26, in Main mw.leaderboard = start_main(season_start, season_end, current_season) File "/Users/m1air/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 41, in init self.setupUI() File "/Users/m1air/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 97, in setupUI self.load_leaderboard() File "/Users/m1air/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 194, in load_leaderboard load_league(self, colors) File "/Users/m1air/Library/Application Support/Anki2/addons21/41708974/League.py", line 51, in load_league if league_name == user_league_name and xp != 0: UnboundLocalError: local variable 'user_league_name' referenced before assignment

Gaaruda commented 2 years ago

same error occurred for me also

theymom commented 2 years ago

Hey! Just to update on the above matter, it has been resolved. Not very sure what is the problem but I think it is because I am 'logged in' on Leaderboard with two devices. After logging out on both devices, I am able to view the leaderboard again with my new account.

davidpilop commented 2 years ago

Same error. I was not able to solve it in the way described in the previous message. I can see the home screen leaderboard, but I can't open the add-on.

Anki 2.1.51 (cf78a555) Python 3.9.10 Qt 6.2.2 PyQt 6.2.2 Platform: Linux Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-05-07 13:36:14

Caught exception: Traceback (most recent call last): File "/home/user/.local/share/Anki2/addons21/41708974/init.py", line 26, in Main mw.leaderboard = start_main(season_start, season_end, current_season) File "/home/user/.local/share/Anki2/addons21/41708974/Leaderboard.py", line 41, in init self.setupUI() File "/home/user/.local/share/Anki2/addons21/41708974/Leaderboard.py", line 97, in setupUI self.load_leaderboard() File "/home/user/.local/share/Anki2/addons21/41708974/Leaderboard.py", line 194, in load_leaderboard load_league(self, colors) File "/home/user/.local/share/Anki2/addons21/41708974/League.py", line 51, in load_league if league_name == user_league_name and xp != 0: UnboundLocalError: local variable 'user_league_name' referenced before assignment

ThoreBor commented 2 years ago

Could you let me know your usernames, so I can look into it?

Viren070 commented 2 years ago

I have only recently made an account and when I click on the leaderboard section I get this error. This error also occurs when i click on my name on the leaderboard. My username is Viren_7 Debug info: Anki 2.1.49 (dc80804a) 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: 2022-05-24 10:24:56

Caught exception:
Traceback (most recent call last):
  File "C:\Users\viren\AppData\Roaming\Anki2\addons21\41708974\__init__.py", line 26, in Main
    mw.leaderboard = start_main(season_start, season_end, current_season)
  File "C:\Users\viren\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 45, in __init__
    self.setupUI()
  File "C:\Users\viren\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 106, in setupUI
    self.load_leaderboard()
  File "C:\Users\viren\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 203, in load_leaderboard
    load_league(self, colors)
  File "C:\Users\viren\AppData\Roaming\Anki2\addons21\41708974\League.py", line 53, in load_league
    if league_name == user_league_name and xp != 0:
UnboundLocalError: local variable 'user_league_name' referenced before assignment
ThoreBor commented 2 years ago

It seems like this happens before the next season starts. I'll look into it, but it might take a while because I'm busy atm.

FNDAster commented 2 years ago

Been having the same issue as the others. Here's the error report:

Anki 2.1.44 (b2b3275f) 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: 2022-08-16 22:35:14

Caught exception: Traceback (most recent call last): File "C:\Users\Gary\AppData\Roaming\Anki2\addons21\41708974__init.py", line 26, in Main mw.leaderboard = start_main(season_start, season_end, current_season) File "C:\Users\Gary\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 45, in init__ self.setupUI() File "C:\Users\Gary\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 106, in setupUI self.load_leaderboard() File "C:\Users\Gary\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 203, in load_leaderboard load_league(self, colors) File "C:\Users\Gary\AppData\Roaming\Anki2\addons21\41708974\League.py", line 53, in load_league if league_name == user_league_name and xp != 0: UnboundLocalError: local variable 'user_league_name' referenced before assignment

aliapederson commented 2 years ago

Same error. Username etAlia. Any idea how to fix?

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.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.16 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-08-17 18:27:32 Add-ons possibly involved: ⁨Leaderboard⁩

Caught exception: Traceback (most recent call last): File "/Users/alexispederson/Library/Application Support/Anki2/addons21/41708974/init.py", line 26, in Main mw.leaderboard = start_main(season_start, season_end, current_season) File "/Users/alexispederson/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 45, in init self.setupUI() File "/Users/alexispederson/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 106, in setupUI self.load_leaderboard() File "/Users/alexispederson/Library/Application Support/Anki2/addons21/41708974/Leaderboard.py", line 203, in load_leaderboard load_league(self, colors) File "/Users/alexispederson/Library/Application Support/Anki2/addons21/41708974/League.py", line 53, in load_league if league_name == user_league_name and xp != 0: UnboundLocalError: local variable 'user_league_name' referenced before assignment

ThoreBor commented 2 years ago

Does it work again now?

FNDAster commented 2 years ago

It does!