What’s the timeline for the release of 23.10? After opening it I got 13 (!) error messages from Addons that worked fine in the last version.
Besides many Qt5-errors the new versioning schema also causes this line of code to fail:
minor_version = int(anki_version.split(".")[2])
Maybe this would be a good time to make the error message caused by Addons a bit more user friendly? I can about imagine how the average non technical person will react when they are hit with 10+ popups that say “Error” in the headline. Most normies will not read past that and be frustrated and insecure about the state of their collection.
How about this?
Couldn’t load [Addon-Name]
This add-on produced an error when Anki tried to load it. If you encountered this error after installing a new version of Anki the author of this add-on probably hasn’t updated it to support this version yet. In any case it’s a problem with this add-on’s code, not with your collection.
What to do: If you don’t want to see this message again during startup you can simply deactivate the addon for now or go back to a previous version of Anki which you can find here. You might also want to contact the addon author and let them now about this issue.
Technical Details (hidden by default, need to be expanded by clicking [Show] like in the import log):
When loading ‘Butler-Addon’:
Traceback (most recent call last):
File “C:\Users\Thomas\AppData\Roaming\Anki2\addons21\1439937507\butler.py”, line 3195, in
from PyQt5.QtWidgets import QAction
ModuleNotFoundError: No module named ‘PyQt5’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “aqt.addons”, line 239, in loadAddons
File “C:\Users\Thomas\AppData\Roaming\Anki2\addons21\1439937507_init_.py”, line 1, in
from . import butler
File “C:\Users\Thomas\AppData\Roaming\Anki2\addons21\1439937507\butler.py”, line 3197, in
from PyQt6.QtWidgets import QAction
ImportError: cannot import name ‘QAction’ from ‘PyQt6.QtWidgets’ (C:\Users\Thomas\AppData\Local\Programs\Anki 23.10 Beta 6\lib\PyQt6\QtWidgets.pyd)
Below it, offer the following buttons:
[Deactivate]
→ Deactivates the addon directly from this popup
[Contact addon author]
→ Opens link or even a preformatted email to the addon author with the correct subject (error name and line) and the error message already put in.
I think this would frighten the average user much less because its clear that there was a problem with the addon and not with their collection (God forbid). Many people will think that at least for a split second if they open Anki and the first word they read is “Error”.
When an error occurs in an addon later on (after it was loaded without problem) the text and design should probably be tweaked slightly. (Everybody feel free to improve upon this idea, obviously!)