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

Crashes with Python 3.10 #156

Closed
AlexBocken opened this issue Dec 13, 2021 · 2 comments
Closed

Crashes with Python 3.10 #156

AlexBocken opened this issue Dec 13, 2021 · 2 comments

Comments

@AlexBocken
Copy link

After updating to python 3.10 on my system it seems like CrowdAnki crashes on startup.

Here's the oupout by Anki:

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 '⁨CrowdAnki JSON exportimport Edit history Collaborate on deck creation⁩':
⁨Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/addons.py", line 230, in loadAddons
    __import__(addon.dir_name)
  File "/home/alex/.local/share/Anki2/addons21/1788670778/__init__.py", line 5, in <module>
    from . import main
  File "/home/alex/.local/share/Anki2/addons21/1788670778/main.py", line 8, in <module>
    from .anki.hook_vendor import HookVendor
  File "/home/alex/.local/share/Anki2/addons21/1788670778/anki/hook_vendor.py", line 6, in <module>
    from ..export.anki_exporter_wrapper import exporters_hook
  File "/home/alex/.local/share/Anki2/addons21/1788670778/export/anki_exporter_wrapper.py", line 3, in <module>
    from .anki_exporter import AnkiJsonExporter
  File "/home/alex/.local/share/Anki2/addons21/1788670778/export/anki_exporter.py", line 11, in <module>
    from ..representation import deck_initializer
  File "/home/alex/.local/share/Anki2/addons21/1788670778/representation/deck_initializer.py", line 1, in <module>
    from functional import seq
  File "/home/alex/.local/share/Anki2/addons21/1788670778/dist/functional/__init__.py", line 7, in <module>
    from functional.streams import seq, pseq
  File "/home/alex/.local/share/Anki2/addons21/1788670778/dist/functional/streams.py", line 12, in <module>
    from functional.pipeline import Sequence
  File "/home/alex/.local/share/Anki2/addons21/1788670778/dist/functional/pipeline.py", line 17, in <module>
    from tabulate import tabulate
  File "/home/alex/.local/share/Anki2/addons21/1788670778/dist/tabulate.py", line 16, in <module>
    from collections import Iterable
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Looking at the AnkiWeb site for this Addon it seems like someone already had this issue on December 10th. At least it crashes for someone.

My guess is still that this might be because of python 3.10 as I didn't have any issues this morning before upgrading from 3.9 to 3.10. I'm running Arch Linux (btw), Python 3.10. Let me know if you need any other information to get this issue resolved.

@aplaice
Copy link
Collaborator

aplaice commented Dec 13, 2021

Thanks for the report!

The crash is due to the old version of tabulate in dist/ in the current released CrowdAnki version. You'll almost certainly have version 0.8.7. (You can check by looking for something like: /home/alex/.local/share/Anki2/addons21/1788670778/dist/tabulate-0.8.7-py3.7.egg-info/.)

In master we've updated to tabulate 0.8.9 (which deals correctly with Python 3.10), but this hasn't been released yet. (It should be soon.)

In the meantime, you could manually patch your installation by copying the latest tabulate.py to replace the old one (/home/alex/.local/share/Anki2/addons21/1788670778/dist/tabulate.py).


Arch Linux (btw)

:)

@AlexBocken
Copy link
Author

AlexBocken commented Dec 13, 2021 via email

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

No branches or pull requests

2 participants