CrowdAnki icon indicating copy to clipboard operation
CrowdAnki copied to clipboard

CrowdAnki Colaboration Problems

Open saladuit opened this issue 3 years ago • 7 comments

While trying to setup my CrowdAnki Project, my girlfriend tried to use the project in her environment to check if everything works as it should. However she is unable to import the deck through CrowdAnki: git repository. The following error was thrown: Error: There is no /Users/support/Library/Application Support/Anki2/addons21/1788670778/user_files/User 1/The-C-Programming-Language-Flahscards/The-C-Programming-Language-Flahscards.json file inside of the selected directory. While trying to import deck from directory /Users/support/Library/Application Support/Anki2/addons21/1788670778/user_files/User 1/The-C-Programming-Language-Flahscards

So she tried to clone it on to her machine, after which she tried CrowdAnki: import from disk which throws the following error:

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 to the add-on author. Debug info: Anki 2.1.52 (ab1c2395) Python 3.9.7 Qt 5.14.1 PyQt 5.14.1 Platform: Mac 12.3.1 Flags: frz=True ao=True sv=? Add-ons, last update check: 2022-05-23 20:14:13 Add-ons possibly involved: ⁨CrowdAnki JSON exportimport Edit history Collaborate on deck creation⁩

Caught exception: Traceback (most recent call last): File "/Users/support/Library/Application Support/Anki2/addons21/1788670778/anki/ui/action_vendor.py", line 31, in lambda: AnkiJsonImporter.import_deck(self.window.col, self.directory_vendor)) File "/Users/support/Library/Application Support/Anki2/addons21/1788670778/importer/anki_importer.py", line 114, in import_deck AnkiJsonImporter.import_deck_from_path(collection, Path(directory_path)) File "/Users/support/Library/Application Support/Anki2/addons21/1788670778/importer/anki_importer.py", line 103, in import_deck_from_path if importer.load_deck(directory_path): File "/Users/support/Library/Application Support/Anki2/addons21/1788670778/importer/anki_importer.py", line 37, in load_deck aqt.mw.backup() AttributeError: 'AnkiQt' object has no attribute 'backup'

saladuit avatar May 23 '22 19:05 saladuit

Correction: The import via github works. However the second error persists.

saladuit avatar May 23 '22 19:05 saladuit

Sorry! This is the fixed-in-master-but-not-in-release #166.

I'll see about getting a release out, here and on AnkiWeb, asap!

aplaice avatar May 23 '22 22:05 aplaice

Thank you for your quick reply! This was my first raised issue on github🥳! Do you have an indication on when the patch will come out?

saladuit avatar May 24 '22 06:05 saladuit

Do you have an indication on when the patch will come out?

You can get the latest release from GitHub here (crowd_anki_20220523.zip) (though installing it is slightly finicky — you have to paste it into the ...../addons21/ directory).

I'm not sure when the release on AnkiWeb will be ready — it might take a while.

aplaice avatar May 24 '22 14:05 aplaice

CrowdAnki is now updated on AnkiWeb, so #166 (the second ("no attribute backup") issue) should now be fixed!

aplaice avatar May 27 '22 21:05 aplaice

The first error "There is no /Users/support/Library/Application Support/Anki2/addons21/1788670778/user_files/User 1/The-C-Programming-Language-Flahscards/The-C-Programming-Language-Flahscards.json file inside of the selected directory." is due to the deck being in a subdirectory (The-C-Programming-Language-Flahscards/The_C_Programming_Language/deck.json) rather than in the top directory (e.g. The-C-Programming-Language-Flahscards/deck.json).

This could be resolved in CrowdAnki by checking recursively inside subdirectories (and probably eventually will be once support for multiple separate decks inside a single git repo is added), but it will require some thought on how best to deal with re-export, so unfortunately it probably won't be coming very soon.

In the meantime, you can include files like License.md and Readme.md in the same (top) directory as the deck (deck.json etc.), even if it might be slightly aesthetically ugly. (I hope it's not too annoying!)

aplaice avatar Jun 07 '22 16:06 aplaice

@aplaice I will try it tonight and I will let you know! Thank you for the effort!

saladuit avatar Jun 09 '22 07:06 saladuit