FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.05k stars 204 forks source link

Can’t add Anki cards, always get an alert saying “Error: Note Could Not Be Added” #123

Closed HughxDev closed 6 years ago

HughxDev commented 6 years ago
JayDugger commented 6 years ago

I had a similar problem. I could add expressions and readings, but I could not add kanji. While troubleshooting I tried changing the Anki note types used for kanji by Yomichan. Neither of the two worked for adding kanji nor for adding terms from Yomichan. I also found I could add kanji if I used the note type I'd been using for terms.

The three note types had different numbers of fields. The term note type had five fields. The first kanji note type had thirteen fields, and the second kanji note type had twenty fields. I suspect that Yomichan or AnkiConnect have a problem with note have types that more than a certain number of fields, but it might also be a limit on field name length or something else entirely.

I worked around it by making two new Anki Note types, one for terms and one for kanji. The fields of those types exactly match the available values from Yomichan, and they appear in the same order as in Yomichan. Each note type makes an exception for field ordering by placing the recommended field first in the note type.

"As Anki requires the first field in the model to be unique, it is recommended that you set it to {expression} for term flashcards and {character} for Kanji flashcards."

I don't think you have the same problem, but the work-around I describe might help.

hserranome commented 6 years ago

Same thing was happening to me. After spending a while trying to make it work I discovered that removing the audio field "solved it".

So, while having the audio field filled in any of these can happen:

I didn't manage to catch the error, I'm not used to debugging Chrome addons. For now I'm using it without audio. Any ideas?

izman111 commented 6 years ago

I have the same problem as well -- also due to audio.

FooSoft commented 6 years ago

This is fixed -- I don't have any control over the audio sources, but if you upgrade to the latest version of AnkiConnect, it will allow you to add the card even if the audio is missing.