vonpetersenn / Pleco-to-Anki

An AddOn for the flashcard App to import bookmark files from the chinese dictionary app Pleco.
The Unlicense
9 stars 3 forks source link

Plugin doesn't run on install #6

Closed gmvdm closed 7 months ago

gmvdm commented 7 months ago

I installed via the AddOns interface, and it didn't run. I then installed via the download of the 1.0.4 bundle, and still didn't run.

Details here:

Anki 24.04 (429bc9e1) (ao) Python 3.9.18 Qt 6.6.2 PyQt 6.6.1 Platform: macOS-14.4.1-arm64-arm-64bit

Traceback (most recent call last): File "/Users/gvdm/Library/Application Support/Anki2/addons21/pleco_to_anki/init.py", line 21, in excecuted_function dialog = ImportBookmarksGUI() File "/Users/gvdm/Library/Application Support/Anki2/addons21/pleco_to_anki/ImportBookmarksGUI.py", line 18, in init self.setWindowModality(Qt.ApplicationModal) AttributeError: type object 'Qt' has no attribute 'ApplicationModal'

===Add-ons (active)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Pleco to Anki ['pleco_to_anki', 0, 'None', '']

===IDs of active AnkiWeb add-ons===

===Add-ons (inactive)=== (add-on provided name [Add-on folder, installed at, version, is config changed])

vonpetersenn commented 7 months ago

Hello I think the problem occurs because you use Anki with the Qt6 version. https://docs.ankiweb.net/platform/mac/installing.html#qt5-vs-qt6

I didn't know that the GUI that I wrote is (apperantly) not compatible with Qt6. If you download Qt5 and it works, can you let me know? If I know that this is the problem, I can change the code when I have more time and update the information accordingly until then.

vonpetersenn commented 7 months ago

I was able to reproduce the error on Anki version 24.04 and fixed it. I added a new release for newer Anki versions on GitHub and on Ankiweb.

I developed the AddOn for an older Anki version (since some of the AddOn I use myself have not been updated to work on Anki 24) so I haven't noticed before.

Best

gmvdm commented 7 months ago

Awesome, thank you! I downloaded 1.0.5 and can confirm it worked on my setup.