Arthur-Milchior / anki-copy-note

An add-on to copy anki's note
GNU General Public License v3.0
23 stars 9 forks source link

Not working in anki 23.10 #48

Open orangelover12 opened 11 months ago

orangelover12 commented 11 months ago

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!

swa72 commented 11 months ago

I can second that - would be nice, if the add-on works with Anki 23.10.

YijieMin commented 10 months ago

The error message is:

Anki 23.10.1 (fac9e0ee) Python 3.9.15 Qt 6.6.0 PyQt 6.6.0
Platform: Windows-10-10.0.22631
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2023-11-16 15:26:15

When loading Copy notes:
Traceback (most recent call last):
  File "aqt.addons", line 245, in loadAddons
  File "C:\Users\minyi\AppData\Roaming\Anki2\addons21\1566928056\__init__.py", line 1, in <module>
    from . import copyNote, debug
  File "C:\Users\minyi\AppData\Roaming\Anki2\addons21\1566928056\copyNote.py", line 26, in <module>
    from PyQt5.QtCore import *
ModuleNotFoundError: No module named 'PyQt5'

And the release page shows : "Quite a few add-ons will need updates to support the Qt 6 version of this release. " So, I try to modify PyQt5 in the file Anki2\addons21\1566928056\copyNote.py to PyQt6

from PyQt6.QtCore import *
from PyQt6.QtGui import *
from PyQt6.QtWidgets import *

And it works.

Aveeno1432 commented 10 months ago

Thanks to you, I solved the problem. Thank you very much. Have a nice day!

Wanderlustcuckoo commented 8 months ago

Just adding (for myself later if for nobody else) that this also works on the Linux version of Anki on Chrome OS, which I installed by following these instructions.

The file copyNote.py is under ~/.local/share/Anki2/addons21/1566928056/ and I edited it with nano to change the three PyQt5 references described above to PyQt6.