Closed MartinBernstorff closed 3 years ago
I made this error message more detailed and published the fix in genanki version 0.10.1, which is now on PyPI.
By the way, check out pdb.post_mortem
for a way you could debug this issue without needing a fix in genanki. But I agree that the more detailed error message is helpful, thanks for the suggestion!
https://github.com/kerrickstaley/genanki/blob/d3a5ac5d5a06ee29565a1173a1f63bbba252d265/genanki/note.py#L124
I ran into this error recently when installing genanki on a new user account (and incidentally updating it), and it was very hard to debug.
I generate thousands of cards each time across two note types, and I still don't know which note type or card generated the problem – instead, I ended up downgrading to 0.8.0.
I suggest adding model name or similar to the valueError, but am not sufficiently competent to add a new commit :-)