kaegi / MorphMan

Anki plugin that reorders language cards based on the words you know
Other
262 stars 66 forks source link

Anki 2.1.26 Recalc UTF-8 error #140

Open ShakeItCherry opened 4 years ago

ShakeItCherry commented 4 years ago

Hey guys, i already changed my stats.py but now i get this error:

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site. Debug info: Anki 2.1.26 (70784154) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-06-18 11:08:07

Caught exception: Traceback (most recent call last): File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 41, in call return self.cache[args] KeyError: ('(青葉)“涼風(すずかぜ)青葉ですよろしくお願いします”',)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 41, in call return self.cache[args] KeyError: ('(青葉)“涼風(すずかぜ)青葉ですよろしくお願いします”',)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 41, in call return self.cache[args] KeyError: ()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631__init.py", line 14, in onMorphManRecalc main.main() File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\main.py", line 430, in main allDb = mkAllDb(cur) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\main.py", line 126, in mkAllDb ms = getMorphemes(morphemizer, fieldValue, ts) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\morphemes.py", line 165, in getMorphemes ms = morphemizer.getMorphemesFromExpr(expression) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\morphemizer.py", line 68, in getMorphemesFromExpr return getMorphemesMecab(expression) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 43, in call value = self.func(args) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 86, in getMorphemesMecab ms = [getMorpheme(m.split('\t')) for m in interact(e).split('\r')] File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 43, in call value = self.func(args) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\mecabwrapper.py", line 220, in interact p, = mecab() File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 43, in call__ value = self.func(args) File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 213, in mecab return spawnMecab(m.mecabCmd[:1] + m.mecabCmd[4:], si), mecab_source File "C:\Users\João Comassetto\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 109, in spawnMecab '^bos-feature: (.)$', str(config_dump, 'utf-8'), flags=re.M) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 144: invalid continuation byte

landonepps commented 3 years ago

Possibly related to the ã character in your path. See my comment on the other issue for a workaround: https://github.com/kaegi/MorphMan/issues/159#issuecomment-745607777