ThoreBor / Anki_Leaderboard

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

Unable to open leaderboard #47

Closed Sabicool closed 4 years ago

Sabicool commented 4 years ago

Received the following error when trying to open the leaderboard. My config for leaderboard is: group- med school anki and country is Australai, next day starts 4 horus after midnight and automatically scroll to myself is checked.

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.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-04-11 23:09:16

Caught exception:
Traceback (most recent call last):
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\__init__.py", line 17, in Main
    mw.leaderboard = start_main()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 24, in __init__
    self.setupUI()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 43, in setupUI
    self.sync()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 228, in sync
    self.dialog.Friends_Leaderboard.item(friend_counter-1, j).setBackground(QtGui.QColor("#51f564"))
AttributeError: 'NoneType' object has no attribute 'setBackground'
ThoreBor commented 4 years ago

I just uploaded a hot fix. Please check if this solves the problem

Sabicool commented 4 years ago

Nope issue still remains

Sabicool commented 4 years ago

Same error message:

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.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-04-11 23:09:16

Caught exception:
Traceback (most recent call last):
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\__init__.py", line 17, in Main
    mw.leaderboard = start_main()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 24, in __init__
    self.setupUI()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 43, in setupUI
    self.sync()
  File "C:\Users\saabh\AppData\Roaming\Anki2\addons21\41708974\Leaderboard.py", line 228, in sync
    self.dialog.Friends_Leaderboard.item(friend_counter-1, j).setBackground(QtGui.QColor("#51f564"))
AttributeError: 'NoneType' object has no attribute 'setBackground'

If you need any other information for debugging let me know

ThoreBor commented 4 years ago

Uploaded another version seconds ago. Please check again

Sabicool commented 4 years ago

It works!. I'll close this thread now. Thank you for your work man, anki has more motivation now because of competition with friends

ThoreBor commented 4 years ago

Great!