After the v23.10 update the add-on doesn't work anymore.
Anki 23.10 (51a10f09) Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: Windows-10-10.0.19045
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-11-07 10:11:33
When loading Reset Card Scheduling:
Traceback (most recent call last):
File "aqt.addons", line 244, in loadAddons
File "C:\Users\username\AppData\Roaming\Anki2\addons21\300884351\__init__.py", line 15, in <module>
from . import main
File "C:\Users\username\AppData\Roaming\Anki2\addons21\300884351\main.py", line 21, in <module>
from .consts import anki21
File "C:\Users\username\AppData\Roaming\Anki2\addons21\300884351\consts.py", line 22, in <module>
addon_path = os.path.dirname(__file__).decode(sys_encoding)
AttributeError: 'str' object has no attribute 'decode'
A user mentioned in a review to change the following line
After the v23.10 update the add-on doesn't work anymore.
A user mentioned in a review to change the following line
https://github.com/glutanimate/reset-card-scheduling/blob/6f62657ebe1b0683818bff7d55797fdebb3c716d/src/reset_card_scheduling/consts.py#L22
to
https://ankiweb.net/shared/info/300884351
In Python 2, string objects expose a decode() function. In Python 3, however, you don't have to decode your strings they're stored in Unicode.
The new way to check versions - see https://forums.ankiweb.net/t/porting-tips-for-anki-23-10/35916