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

Anki 2.1 addons not working #158388

Closed
little-dude opened this issue Feb 6, 2022 · 3 comments
Closed

Anki 2.1 addons not working #158388

little-dude opened this issue Feb 6, 2022 · 3 comments

Comments

@little-dude
Copy link

Describe the bug

I installed this addon https://ankiweb.net/shared/info/1508357010 via the Tools > Addons menu. After restarting anki, a pop-up shows the following message:

An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading 'Remaining time for Anki 21':
Traceback (most recent call last):
  File "/nix/store/pp2b7f9vkl8912yjx3gsd1z27nrz05mw-anki-2.1.15/lib/python3.9/site-packages/aqt/addons.py", line 80, in loadAddons
    __import__(dir)
  File "/home/little-dude/.local/share/Anki2/addons21/1508357010/__init__.py", line 26, in <module>
    from .utils import debugLog  # debug log registered here
  File "/home/little-dude/.local/share/Anki2/addons21/1508357010/utils/debugLog.py", line 2, in <module>
    from .JSCallable import JSCallable
  File "/home/little-dude/.local/share/Anki2/addons21/1508357010/utils/JSCallable.py", line 1, in <module>
    from aqt import gui_hooks
ImportError: cannot import name 'gui_hooks' from 'aqt' (/nix/store/pp2b7f9vkl8912yjx3gsd1z27nrz05mw-anki-2.1.15/lib/python3.9/site-packages/aqt/__init__.py)

This other plugin fails in a similar fashion: https://ankiweb.net/shared/info/446355629

An add-on you installed failed to load. If problems persist, please go to the Tools>Add-ons menu, and disable or delete the add-on.

When loading 'Automatic Dark Night Mode':
Traceback (most recent call last):
  File "/nix/store/pp2b7f9vkl8912yjx3gsd1z27nrz05mw-anki-2.1.15/lib/python3.9/site-packages/aqt/addons.py", line 80, in loadAddons
    __import__(dir)
  File "/home/little-dude/.local/share/Anki2/addons21/446355629/__init__.py", line 2, in <module>
    from aqt.theme import theme_manager
ModuleNotFoundError: No module named 'aqt.theme'

Steps To Reproduce

  1. install Anki 2.1 with `nix-env -iA nixos.anki
  2. start Anki the "Automatic Dark Night Mode" plugin: click Tools > Addons > Get Add-ons... and enter the code 446355629.
  3. restart Anki, the error message appears and the plugin doesn't work

Expected behavior

No error message when starting Anki, and the plugins work

Notify maintainers

@oxij @Profpatsch

Metadata

nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.06 MiB download, 0.30 MiB unpacked):
  /nix/store/nzqp5skqlczar1smnc9rppnv2nxvdlzp-bash-interactive-5.1-p12-dev
copying path '/nix/store/nzqp5skqlczar1smnc9rppnv2nxvdlzp-bash-interactive-5.1-p12-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.16.4, NixOS, 22.05 (Quokka)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.6.0`
 - channels(root): `"nixos-22.05pre350838.554d2d8aa25"`
 - channels(little-dude): `"home-manager, nixos-22.05pre337103.581d2d6c9cd"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@euank
Copy link
Member

euank commented Apr 12, 2023

The "remaining time" addon works for me with the anki version on master, from this update over here: #221229

Want to check if all the addons you care about work now, with that version?

@patka-123
Copy link
Contributor

Hello @little-dude 👋

I tried to reproduce your error, but failed to do so. Is this still an issue you experience, or is it fixed? If so, would you be able to close this issue?

@patka-123
Copy link
Contributor

I'm going to take the leap and guess that this has been fixed by now. If this was a mistake then please feel free to reopen this issue!

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

No branches or pull requests

3 participants