kelciour / movies2anki

Convert movies with subtitles to watch them with Anki. Inspired by subs2srs
GNU Affero General Public License v3.0
306 stars 29 forks source link

Add-on you installed failed to load #37

Closed WACKYF0X closed 2 months ago

WACKYF0X commented 2 months ago

Can't load plugin:

When loading 'Watch Foreign Language Movies with Anki': Traceback (most recent call last): File "/usr/share/anki/aqt/addons.py", line 80, in loadAddons import(dir) File "/home/hostname/.local/share/Anki2/addons21/939347702/init.py", line 1, in from . import movies2anki File "/home/hostname/.local/share/Anki2/addons21/939347702/movies2anki.py", line 35, in import pysubs2 File "/home/hostname/.local/share/Anki2/addons21/939347702/vendor/pysubs2/init.py", line 1, in from .ssafile import SSAFile File "/home/hostname/.local/share/Anki2/addons21/939347702/vendor/pysubs2/ssafile.py", line 2, in from collections import MutableSequence, OrderedDict ImportError: cannot import name 'MutableSequence' from 'collections' (/usr/lib/python3.10/collections/init.py)

log.txt

kelciour commented 2 months ago

Try installing the latest Anki version (24.06.3 Qt6) from https://apps.ankiweb.net and updating the add-on after opening Anki or via Tools > Add-ons > Check for Updates.

WACKYF0X commented 2 months ago

Yes, it's 24.06.3 Qt6 - no updates for addon at all, not work with it. But, with no problem works with QT5 version of Anki.

In log saw some errors about pyqt5 plugin and variables 'isMac' 'isWin'. May be Qt6 version has some conflicts yet.

kelciour commented 2 months ago

That's odd. The original error message corresponds to the old version of the add-on that was likely installed on Anki 2.1.0-2.1.49.

Try to remove the add-on and install it again. It should pick up the latest version that is available for Anki 2.1.66-24.06+. It includes the updated version of pysubs2 that should work with Python 3.10 and isMac was replaced with is_mac.

kelciour commented 2 months ago

I'm clothing it now. If the issue is still present after reinstalling the add-on, try to replace the add-on's files (Tools > Add-ons > View Files) with the files from this repository and restart Anki.