# Leaderboard bug problem

**URL:** <https://forums.ankiweb.net/t/leaderboard-bug-problem/25793>\
**Category:** Add-ons\
**Created:** [December 30, 2022, 3:29am UTC](https://forums.ankiweb.net/t/leaderboard-bug-problem/25793 "2022-12-30T03:29:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NameLessGO](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/namelessgo/32/34298_2.png) [@NameLessGO](https://forums.ankiweb.net/u/NameLessGO)\
**Post date:** [December 30, 2022, 3:29am UTC](https://forums.ankiweb.net/t/leaderboard-bug-problem/25793/1 "2022-12-30T03:29:03Z")

</div>

Continuing the discussion from [Trouble porting Qt5 addon to Qt6](https://forums.ankiweb.net/t/trouble-porting-qt5-addon-to-qt6/25748/5):  
Bug been reported, happens occasionally

> <https://github.com/ThoreBor/Anki_Leaderboard/issues/175>
>
> I had just deleted an old account and signed up for a new one using the same ema…il 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\](https://help.ankiweb.net/discussions/add-ons/) 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
