kaegi / MorphMan

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

HELP A BROTHER OUT - Morphman doesn't recognize mecab dictionary #240

Closed vmalheiros closed 2 years ago

vmalheiros commented 3 years ago

I'm using anki 2.1.35 MeCab UniDic Japanese Dictionary 13462835 MorphMan for Anki 2.1 900801631

It says morphemizer "Japanese UNAVAILABLE" and when I try to recalc, this appears

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.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2021-02-09 12:09:08

Caught exception: Traceback (most recent call last): File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 38, in call return self.cache[args] KeyError: ('電車はたった今出たところです。',)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 38, in call return self.cache[args] KeyError: ('電車はたった今出たところです。',)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 38, in call return self.cache[args] KeyError: ()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631__init.py", line 17, in onMorphManRecalc main.main() File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\main.py", line 574, in main allDb = mkAllDb(cur) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\main.py", line 196, in mkAllDb ms = getMorphemes(morphemizer, fieldValue, ts) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\morphemes.py", line 166, in getMorphemes ms = morphemizer.getMorphemesFromExpr(expression) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\morphemizer.py", line 49, in getMorphemesFromExpr morphs = self._getMorphemesFromExpr(expression) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\morphemizer.py", line 113, in _getMorphemesFromExpr return getMorphemesMecab(expression) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 40, in call value = self.func(args) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 106, in getMorphemesMecab ms = [getMorpheme(m.split('\t')) for m in interact(e).split('\r')] File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 40, in call value = self.func(args) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\mecabwrapper.py", line 253, in interact p, = mecab() File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\util_external.py", line 40, in call__ value = self.func(args) File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 246, in mecab return spawnMecab(m.mecabCmd[:1] + m.mecabCmd[4:], si), mecab_source File "C:\Users\Víctor Malheiros\AppData\Roaming\Anki2\addons21\900801631\morph\mecab_wrapper.py", line 129, in spawnMecab '^bos-feature: (.)$', str(config_dump, 'utf-8'), flags=re.M) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 143: invalid continuation byte

ghost commented 3 years ago

Having the same problem.

vmalheiros commented 3 years ago

Nobody helped me, but I'm gonna help you, brotha. I figured it out. If your problem is the same as mine, it's because of unsupported characters in your User Folder's name. My folder was named "Víctor", and it didn't support this ´ character. I changed the name and it worked. Good luck, son.

ghost commented 3 years ago

Nice! That was the problem. Thanks!