FooSoft / yomichan-anki

Plugin for sentence/vocab mining Japanese books in Anki.
https://foosoft.net/projects/yomichan-anki
Other
58 stars 12 forks source link

Yomichan not working on windows 10 #12

Closed Erlemar closed 8 years ago

Erlemar commented 8 years ago

Hello!

Some time ago I installed Windows 10 (instead of windows 7) on my PC, now for the first time I tried to launch yomichan and received the following error while trying to see a word definition:

Traceback (most recent call last): File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 339, in onContentMousePress self.updateSampleMouseEvent(event) File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 490, in updateSampleMouseEvent self.updateSampleFromPosition() File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 513, in updateSampleFromPosition self.updateVocabDefs() File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 581, in updateVocabDefs options File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 566, in updateDefs html = builder(defs, self.ankiIsFactValid) File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader_util.py", line 204, in buildVocabDefs html += buildVocabDef(definition, i, query) File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader_util.py", line 184, in buildVocabDef if query('vocab', markupVocabExp(definition)): File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader.py", line 455, in ankiIsFactValid fields = reader_util.formatFields(profile['fields'], markup) File "C:\Users\Andrey\Documents\Anki\addons\yomi_base\reader_util.py", line 89, in formatFields result[field] = value.format(markup) ValueError: unmatched '{' in format

dayjaby commented 8 years ago

In Yomichan go to Edit > Preferences > Anki > Vocabulary (the radio button) and go through all the Values inside of this big table. According to your error message there is one value with a { but without a corresponding }.

For proper usage, please refer to https://foosoft.net/projects/yomichan/, especially Usage # 7

Erlemar commented 8 years ago

Oh, my bad, thank you very much! I used ")" instead of "}".

FooSoft commented 8 years ago

As @dayjaby pointed out, the problem in this case was simple user error. That being said, uncaught exceptions are bad (regardless of the reason), so this will be fixed for the large update I am planning for later this week : )

Erlemar commented 8 years ago

Great news! :) Looking forward for this update!