KarelZe/anki-decks

Notetype import error in `Rechnerstrukturen.apkg`

Closed this issue · 6 comments

This happens repeatably on a fresh import within a newly created Anki profile. See below.

Notes found in file: ⁨563⁩
Notes that could not be imported as note type has changed: ⁨20⁩
Notes skipped, as they're already in your collection: ⁨543⁩

It would be nice to know if you are also able to reproduce this.

@langfield unfortunately I can not reproduce. If I use the binaries from https://github.com/langfield/karelze-anki-decks/releases/tag/v0.0.16a, I get:

image

I'm using the following Anki version:

Version ⁨2.1.54 (b6a7760c)⁩
Python 3.9.7 Qt 6.3.1 PyQt 6.3.1

Seems ok to me. Which approach did you try? Did you use the binaries or did you push using ki to anki?

Apologies, this is from revision 2160378f5ce07c81efa567236c45c6237f3b5505. These binaries were not built with ki.

@langfield Thanks for your comment.

For https://github.com/KarelZe/anki-decks/tree/2160378f5ce07c81efa567236c45c6237f3b5505 I do not run into this issue with my anki installation, as shown below:

image

I'm running anki:

Version ⁨2.1.54 (b6a7760c)⁩
Python 3.9.7 Qt 6.3.1 PyQt 6.3.1

Is there anything I can do regarding the regeneration of the markdown files due to the bugs with the image urls langfield/ki#66 and langfield/ki#64?

Is there anything I can do regarding the regeneration of the markdown files due to the bugs with the image urls langfield/ki#66 and langfield/ki#64?

Yes! You could do one of three things:

  1. Clone a collection with all the original decks inside. Then delete the old ki-generated files and folders, and copy in the new ones. This will only fix issues related to langfield/ki#64, because langfield/ki#66 is not fixed yet.
  2. You could use sed or similar to find-and-replace the pain points within the existing state of the repository (and indeed being able to do this is one of the main reasons ki even exists). If you choose this route, I can help you figure out the appropriate command and arguments. Similarly, this will likely not fix langfield/ki#66 because the double-escaping happens during the push op. I spoke too soon, this appears to be fixable by just manually URL-decoding the src paths within the note sources! How nice! This means the fix within ki should be fairly easy to implement.
  3. You could wait for me to fix langfield/ki#66 and regenerate the notes myself.

@KarelZe Well, I'm no longer getting that error, so I guess it wasn't as repeatable as I thought. Anyway, the notetype for that deck is just a Basic-variant, so if it's an issue, it may be an issue with Anki itself. I vote to close this.

@langfield Thanks. I'll use option 1 for now, as I made further changes to my Ank collection. Will track the ressolution of the broken links with #7 . I guess I'll replace the wrong sources with some regex, as suggested in option 2. No need for you to re-generate the files.