Stvad / CrowdAnki

Plugin for Anki SRS designed to facilitate cooperation on creation of notes and decks.
MIT License
534 stars 44 forks source link

Error when trying to import decks #88

Closed Berserktiger closed 4 years ago

Berserktiger commented 4 years ago

Hello there!

I just recently installed this addon in order to import the extended version of the Ultimate Geography deck. However, everytime I try to import the corresponding folder (and do of course everything according to the official guidelines), I get the following message:

"Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-06-04 19:42:30

Caught exception: Traceback (most recent call last): File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\anki\ui\action_vendor.py", line 31, in lambda: AnkiJsonImporter.import_deck(self.window.col, self.directory_vendor)) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\importer\anki_importer.py", line 89, in import_deck AnkiJsonImporter.import_deck_from_path(collection, Path(directory_path)) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\importer\anki_importer.py", line 78, in import_deck_from_path importer.load_from_directory(directory_path, import_media) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\importer\anki_importer.py", line 45, in load_from_directory self.load_from_file(self.get_deck_path(directory_path)) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\importer\anki_importer.py", line 31, in load_from_file deck.save_to_collection(self.collection) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\representation\deck.py", line 136, in save_to_collection config.save_to_collection(collection) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\representation\deck_config.py", line 22, in save_to_collection config_dict = self.fetch_or_create_config(collection) File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\representation\deck_config.py", line 30, in fetch_or_create_config return UuidFetcher(collection).get_deck_config(self.get_uuid()) or \ File "C:\Users\username\AppData\Roaming\Anki2\addons21\1788670778\utils\uuid.py", line 16, in get_deck_config return get_value_by_uuid(self.collection.decks.all_config(), uuid) AttributeError: 'DeckManager' object has no attribute 'all_config' "

I already tried disabling any other addons installed and also reinstalled CrowdAnki, but the error persists. Am I just incompetent and doing something wrong and does somebody maybe have a solution for me or could this be a bug from the newly released version (because I only installed CrowdAnki after May 31st)?

Stvad commented 4 years ago

Hey @Berserktiger, The newest version of Anki broke some things - #84
I had to update CrowdAnki to work with that, I suspect that broke compatibility with older versions though :(. Can you please try updating to the latest version of Anki? ( 2.1.26 )

Berserktiger commented 4 years ago

Hi @Stvad , Thanks a lot for your fast response! Yes, updating Anki to 2.1.26 fixed the error for me. Sorry, I didn't think about doing that first. Thanks again for your help!

ohare93 commented 4 years ago

@Stvad I believe you can upload multiple versions of the packaged CrowdAnki to AnkiWeb, for compatibility. Here's an add-on with two compatibility sets: https://ankiweb.net/shared/info/1103084694

Actually yes, here it is in the upload Add-on page on AnkiWeb: image

Just need to upload the old file specifying the Anki version before this (with a minus, to prevent users with the old version from updating!) Looks rather annoying to have to do each time though :thinking: perhaps make a file for the current release versioning in version control?

ambimorph commented 4 years ago

Just wanted to confirm: same problem same fix. Thanks!

Stvad commented 4 years ago

@ohare93 indeed. I wish they used semantic versioning. Uploaded an older version of the addon - had to guess at versions. from #78 I put the new version at 2.1.26+