Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-on Startup Failed #80

Open
flippantbird opened this issue Nov 6, 2023 · 8 comments
Open

Add-on Startup Failed #80

flippantbird opened this issue Nov 6, 2023 · 8 comments

Comments

@flippantbird
Copy link

Anki 23.10 (51a10f09) Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.0-x86_64-i386-64bit
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-11-06 06:16:37

When loading Anki-redesign:
Traceback (most recent call last):
File "aqt.addons", line 244, in loadAddons
File "/Users/aarondesouza/Library/Application Support/Anki2/addons21/308574457/init.py", line 11, in
from PyQt5.QtWidgets import QWidget
ModuleNotFoundError: No module named 'PyQt5'

@flippantbird
Copy link
Author

The following add-ons failed to load: ⁨
Anki-redesign
They may need to be updated to support this version of Anki. Click the Check for Updates button to see if any updates are available.
You can use the Copy Debug Info button to get information that you can paste in a report to the add-on author.
For add-ons that don't have an update available, you can disable or delete the add-on to prevent this message from appearing.

@flippantbird flippantbird changed the title No Add-on Startup Failed Nov 6, 2023
@kvn1351
Copy link

kvn1351 commented Nov 22, 2023

@flippantbird Change that line to from aqt.qt import QWidget

@Shirajuki They've moved all Qt modules to aqt now.

@flippantbird
Copy link
Author

Perfect, thanks!!

@kvn1351
Copy link

kvn1351 commented Nov 22, 2023

@flippantbird The issue still exists in the codebase so keep it open pls

@flippantbird flippantbird reopened this Nov 22, 2023
@kvn1351
Copy link

kvn1351 commented Nov 22, 2023

I've also fixed the config window but that isn't a one line change. I'll make a PR if time allows.

@AustinHasten
Copy link

AustinHasten commented Nov 30, 2023

I had luck resolving this by replacing "PyQt5" with "PyQt6" in __init__.py, and then using the script found here (https://stackoverflow.com/a/72658216/3261260) to replace all of the Qt5 enums with the Qt6 versions. No crashes on startup or when opening the configuration menu.

@ArcticDev78
Copy link

This issue is still present in Anki version 23.10.1

@chatterine
Copy link

I had luck resolving this by replacing "PyQt5" with "PyQt6" in init.py, and then using the script found here (https://stackoverflow.com/a/72658216/3261260) to replace all of the Qt5 enums with the Qt6 versions. No crashes on startup or when opening the configuration menu.

Hi! How are you? I'm here because I'm having this issue as well, and I'm not much of a developer so I don't know how to fix it, sadly. Someone from Anki's Discord server told me I should ask you, so here it goes: could you please upload the code of your updated init.py file to Pastebin? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants