Not working in Anki 23.10
Opened this issue · 7 comments
Problem description
Hello!
First of all, I really like this add-on and I would like to thank you.
My issue is that ANKI 23.10 version came out today and this addon does not work.
I would really appreciate it if you could update it.
Have a good day!
Checklist
Please replace the space inside the brackets with an x if the following items apply:
- I've restarted Anki to see if it helps
- I've verified that I use the latest version of the add-on by redownloading it from AnkiWeb
- I've verified that I use the latest version of Anki by checking at https://apps.ankiweb.net#download
- I've tried to disable other add-ons to see if there are any interactions present
- My issue disappears when I hold shift while starting Anki.
- I've checked if anyone else reported this problem before by looking through the issue reports. I also checked to see if there is a section about known issues in the add-on description, documentation, or README.
Information about your Anki set-up
Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):
Error message (if any)
If you've received an error message, please copy and paste it between the backticks below:
Yes, I meant 23.10. I just fixed the post!
Thanks, you can fix the title, too.
Just wanted to provide the debug information, although it probably is easy to reproduce and different on other devices.
When loading Pop-up Dictionary:
Traceback (most recent call last):
File "aqt.addons", line 244, in loadAddons
File "/Users/User/Library/Application Support/Anki2/addons21/popup_dictionary/init.py", line 35, in
from ._addon import * # noqa: F401, F403
File "/Users/User/Library/Application Support/Anki2/addons21/popup_dictionary/_addon.py", line 40, in
from .reviewer import initialize_reviewer
File "/Users/User/Library/Application Support/Anki2/addons21/popup_dictionary/reviewer.py", line 39, in
from PyQt5.QtGui import QKeySequence
ModuleNotFoundError: No module named 'PyQt5'
I have made this add-on work with PyQt6 and describe how to do it below.
How to reproduce
- 1. use enum converter tool in the addon folder.
- 2. Replace all "PyQt5" words to "PyQt6". (I recommend using VSCode for bulk replacement.)
- 3. In "reviewer.py", import QShortcut modules from aqt.qt instead of from QtWidgets
# before
from PyQt6.QtWidgets import QMenu, QShortcut
# after
from PyQt6.QtWidgets import QMenu
...
from aqt.qt import QShortcut
I have previously customized the code for this add-on file myself, so I apologize if this fix does not help.
( Edit: or just download patched addon file from here )
I checked that above procedures work with original pop-up dictionary code. I'll create pull request for this soon.