glutanimate / review-heatmap

Anki add-on to help you keep track of your review activity
https://ankiweb.net/shared/info/1771074083
Other
1.2k stars 88 forks source link

Fedora 35, Anki 2.1.15 loadAddons fails #145

Closed UweRitzmann closed 2 years ago

UweRitzmann commented 2 years ago

Problem description

I tried to install review-heatmap-v1.0.0-beta.1-anki21.ankiaddon with the following steps

  1. Select menu entry "Extras/Erweiterungen" (Extras/extensions or Extras/Addons)
  2. Clicked "Aus Datei installieren..." (Install from file...)
  3. Selected the previously from github downloaded file review-heatmap-v1.0.0-beta.1-anki21.ankiaddon
  4. Installation seemed to have worked
  5. Selected "Datei/Beenden" (File/Quit)
  6. Restarted Anki. Below given error message came up.

While the error message disappears when starting Anki while holding the shift key, there is no indication that any function from the add-on is working.

Checklist

Please replace the space inside the brackets with an x if the following items apply:

I am running Linux Fedora 35 with the official Anki package 2.1.15.

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):

Version 2.1.15 (442df9d6)
Qt 5.15.2 PyQt 5.15.6

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

Eine der installierten Erweiterungen konnte nicht geladen werden. Wenn das Problem weiter besteht, bitte über den Menüpunkt Extras → Erweiterungen die Erweiterungen deaktivieren oder deinstallieren

Beim Laden von 'Review Heatmap':
Traceback (most recent call last):
  File "/usr/share/anki/aqt/addons.py", line 80, in loadAddons
    __import__(dir)
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/__init__.py", line 124, in <module>
    initializeAddon()
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/__init__.py", line 114, in initializeAddon
    from .gui.options import initializeOptions
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/gui/options.py", line 44, in <module>
    from ..libaddon.gui.dialog_options import OptionsDialog
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/libaddon/gui/dialog_options.py", line 48, in <module>
    from .basic.dialog_mapped import MappedDialog
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/libaddon/gui/basic/dialog_mapped.py", line 43, in <module>
    from .dialog_basic import BasicDialog
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/libaddon/gui/basic/dialog_basic.py", line 40, in <module>
    from .interface import CommonWidgetInterface
  File "/home/ritzmann/.local/share/Anki2/addons21/review_heatmap/libaddon/gui/basic/interface.py", line 48, in <module>
    from collections import MutableSequence, MutableSet, MutableMapping
ImportError: cannot import name 'MutableSequence' from 'collections' (/usr/lib64/python3.10/collections/__init__.py)
UweRitzmann commented 2 years ago

Further remark: I had run "dnf upgrade" before trying the addon to ensure that my Fedora install was up to date.

UweRitzmann commented 2 years ago

Sorry, I gave not exactly the setup infos asked for. So here it is:

Anki 2.1.15 (442df9d6) Python 3.10.2 Qt 5.15.2 PyQt 5.15.6
Platform: Linux
Flags: frz=False ao=True sv=1

Add-ons:

Review Heatmap
goedel-gang commented 2 years ago

@UweRitzmann, See this comment, and this pull request. It should be quite straightforward to fix if you're happy to edit a Python file!

glutanimate commented 2 years ago

Hey Uwe,

Thanks for the report! This is fixed with v1.0.0 which is now available AnkiWeb: https://ankiweb.net/shared/info/1771074083.

Unfortunately, however, Anki 2.1.15 is no longer supported by the add-on. Especially in light of all the refactoring efforts Anki has undergone over the past couple of years, it's become almost impossible to support early Anki versions like this in parallel to newly released ones.

If you didn't have a specific reason to go with 2.1.15, I would highly recommend switching to the pre-compiled builds that Anki offers: https://anki.tenderapp.com/kb/anki-ecosystem/third-party-linux-packages-and-source-builds-are-not-supported

An alternative might also be the builds offered via PyPI: https://pypi.org/project/aqt/

Once you've upgraded to either, updating the add-on to v1.0.0 as outlined above should fix the exception.

Hope that helps!

(cf #140)