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

CrowdAnki Colaboration Problems #168

Open
saladuit opened this issue May 23, 2022 · 7 comments
Open

CrowdAnki Colaboration Problems #168

saladuit opened this issue May 23, 2022 · 7 comments

Comments

@saladuit
Copy link

saladuit commented May 23, 2022

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
Copy link
Author

saladuit commented May 23, 2022

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

@aplaice
Copy link
Collaborator

aplaice commented May 23, 2022

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!

@saladuit
Copy link
Author

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?

@aplaice
Copy link
Collaborator

aplaice commented May 24, 2022

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
Copy link
Collaborator

aplaice commented May 27, 2022

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

@aplaice
Copy link
Collaborator

aplaice commented Jun 7, 2022

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!)

@saladuit
Copy link
Author

saladuit commented Jun 9, 2022

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

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