zjosua / anki-mc

Multiple choice questions for Anki.
https://ankiweb.net/shared/info/1566095810
GNU Affero General Public License v3.0
49 stars 16 forks source link

Issue with note type when updating the template #95

Closed jebra102 closed 1 year ago

jebra102 commented 1 year ago

I've been getting an error message since the last update of the addon. It seems to have conflicts with Pokemanki, because it basically disables that. I don't quite understand how the issue has come to be, but this is the message I get.

Fehler Es ist ein Fehler aufgetreten. Bitte starten Sie Anki neu und halten Sie während des Startvorgangs die Umschalttaste gedrückt, damit Anki die installierten Erweiterungen temporär deaktiviert. Wenn das Problem nur auftritt, wenn die Erweiterungen aktiviert sind, dann benutzen Sie bitte den Menueintrag Extras > Erweiterungen um die problembehaftete Erweiterung durch selektives Deaktivieren herauszufinden. Wenn Sie die entsprechende Erweiterung herausgefunden haben, dann bitten wir, dass Sie sich mit einem entsprechenden Problembericht an die Support-Seite für Erweiterungen wenden, damit der Fehler behoben werden kann. Debuginformationen: Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1 Platform: Windows 10 Flags: frz=True ao=True sv=3 Add-ons, last update check: 2022-11-30 12:01:29

Caught exception: Traceback (most recent call last): File "aqt.progress", line 118, in handler File "aqt.main", line 197, in on_window_init File "aqt.main", line 243, in setupProfileAfterWebviewsLoaded File "aqt.main", line 290, in setupProfile File "aqt.main", line 470, in loadProfile File "aqt.hooks_gen", line 3244, in call File "C:\Users\Jeane\AppData\Roaming\Anki2\addons21\1566095810\template.py", line 157, in manage_multiple_choice_note_type getOrCreateModel() File "C:\Users\Jeane\AppData\Roaming\Anki2\addons21\1566095810\template.py", line 149, in getOrCreateModel return updateTemplate(mw.col) File "C:\Users\Jeane\AppData\Roaming\Anki2\addons21\1566095810\template.py", line 137, in updateTemplate col.models.save(model) File "anki.models", line 559, in save File "anki.models", line 542, in update File "anki._backend.generated", line 861, in add_or_update_notetype File "anki._backend", line 146, in _run_command anki.errors.CardTypeError: Kartenvorlage ⁨1⁩ von Notiztyp "⁨AllInOne (kprim, mc, sc)⁩" hat ein Problem.
Siehe die Vorschau für weitere Informationen

Not sure if I'm doing something wrong, or if there is some conflict with it.

zjosua commented 1 year ago

I can use both Pokémanki and multiple choice at the same time without problems. Is it possible that you have other conflicting add-ons?

anki.errors.CardTypeError: Kartenvorlage ⁨1⁩ von Notiztyp "⁨AllInOne (kprim, mc, sc)⁩" hat ein Problem. Siehe die Vorschau für weitere Informationen

Did the preview not give you any more information?

jebra102 commented 1 year ago

No, the preview didn't give me any errors. I can also use the cards and create new cards while Multiple Choice is deactivated. No issues with that. It just doesn't allow me to see (or use the menu for) pokemanki. I still get the same pop up when starting, even now using 1.30 for Pokemanki. And Pokemanki is unusable while both are activated. For now, keeping Multiple Choice deactivated allows me to use both addons to the extent that I need it though.

Forgot to add, I uninstalled all other addons to see if it could be another one. Didn't help the issue, the same error pops up.

Edited again to add, if I use the previous version (2.7.0), the issue disappears.

3ter commented 1 year ago

@jebra102 Is this still happening with the latest versions of anki and the note type provided by the addon?

The "card has a problem" should only show if the note template has been altered in an inconsistent way (see https://anki.tenderapp.com/kb/problems/card-template-has-a-problem). You don't need to go through the hassle and deactivate your addons. Just use anki -b /some/temp/folder from the console and install the addon there to see if it works for you from a clean slate (you could then export/import your collection to test it in situ). This is completely separate from your main anki profile folder.

jebra102 commented 1 year ago

I honestly forgot to close this. It works for me again. I don't know if it was an update in the meantime or something else changed, but I don't experience any issues or any Error messages anymore. I can use the card template with no problems, was able to slightly change it to add a field to it I needed and haven't had any other problems.

3ter commented 1 year ago

Thank you for the heads up 👍