Anki Startup exception: Import Error MediaSync

Hello,
I hope someone can shed some light on why this error is occurring on my system. I’m on arch and when I run any Anki version beyond 2.1.66, I’m getting this:

Caught exception:
Traceback (most recent call last):
  File "/home/xxx/.local/bin/anki", line 5, in <module>
    from aqt import run
  File "/home/xxx/.local/lib/python3.11/site-packages/aqt/__init__.py", line 76, in <module>
    from aqt.main import AnkiQt  # isort:skip
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/xxx/.local/lib/python3.11/site-packages/aqt/main.py", line 60, in <module>
    from aqt.mediasync import MediaSyncer
  File "/home/xxx/.local/lib/python3.11/site-packages/aqt/mediasync.py", line 22, in <module>
    LogEntry = Union[Progress.MediaSync, str]
                     ^^^^^^^^^^^^^^^^^^
AttributeError: MediaSync

This error comes up with the anki package in main and aur, both bin and self-compiled. I found something that’s possibly related so I went and compiled the aur anki myself in a clean chroot, to no avail. Curiously enough this also comes up when installed with pip. The problem’s still there and I’m out of ideas. Halp?

Did you try the latest version from pip? This error points to an older version.

1 Like