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

Imports are not compatible with Anki 23.10.1 #28

Open
GBergatto opened this issue Dec 23, 2023 · 0 comments · May be fixed by #29
Open

Imports are not compatible with Anki 23.10.1 #28

GBergatto opened this issue Dec 23, 2023 · 0 comments · May be fixed by #29

Comments

@GBergatto
Copy link

When trying to run this add-on on Anki 23.10.1, I get the following error message:

Anki 23.10.1 (fac9e0e) Python 3.11.6 Qt 6.6.1 PyQt 6.6.1
Platform: Linux-6.6.7-arch1-1-x86_64-with-glibc2.38
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-12-23 08:19:36

When loading Write on your screen:
Traceback (most recent call last):
  File "/home/gb/.local/share/Anki2/addons21/567651868/__init__.py", line 481, in ts_setup_menu
    mw.addon_view_menu
AttributeError: 'AnkiQt' object has no attribute 'addon_view_menu'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/aqt/addons.py", line 245, in loadAddons
    __import__(addon.dir_name)
  File "/home/gb/.local/share/Anki2/addons21/567651868/__init__.py", line 519, in <module>
    ts_onload()
  File "/home/gb/.local/share/Anki2/addons21/567651868/__init__.py", line 183, in ts_onload
    ts_setup_menu()
  File "/home/gb/.local/share/Anki2/addons21/567651868/__init__.py", line 483, in ts_setup_menu
    mw.addon_view_menu = QMenu(_(u"&View"), mw)
                         ^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  QMenu(parent: Optional[QWidget] = None): argument 1 has unexpected type 'str'
  QMenu(title: Optional[str], parent: Optional[QWidget] = None): argument 2 has unexpected type 'AnkiQt'
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

Successfully merging a pull request may close this issue.

1 participant