kaegi / MorphMan

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

Error on recalc #166

Closed edoreld closed 4 years ago

edoreld commented 4 years ago

Error when trying to recalculate:

Debug info:
Anki 2.1.33 (3f403040) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.15.5
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-09-21 21:43:50
Add-ons possibly involved: ⁨MorphMan for Anki 21⁩

Caught exception:
Traceback (most recent call last):
  File "/Users/jmartinezlago/Library/Application Support/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 "/Users/jmartinezlago/Library/Application Support/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 "/Users/jmartinezlago/Library/Application Support/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 "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/__init__.py", line 14, in onMorphManRecalc
    main.main()
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/main.py", line 434, in main
    allDb = mkAllDb(cur)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/main.py", line 128, in mkAllDb
    ms = getMorphemes(morphemizer, fieldValue, ts)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/morphemes.py", line 165, in getMorphemes
    ms = morphemizer.getMorphemesFromExpr(expression)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/morphemizer.py", line 68, in getMorphemesFromExpr
    return getMorphemesMecab(expression)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/util_external.py", line 43, in __call__
    value = self.func(*args)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/mecab_wrapper.py", line 86, in getMorphemesMecab
    ms = [getMorpheme(m.split('\t')) for m in interact(e).split('\r')]
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/util_external.py", line 43, in __call__
    value = self.func(*args)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/mecab_wrapper.py", line 220, in interact
    p, _ = mecab()
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/util_external.py", line 43, in __call__
    value = self.func(*args)
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/mecab_wrapper.py", line 213, in mecab
    return spawnMecab(m.mecabCmd[:1] + m.mecabCmd[4:], si), mecab_source
  File "/Users/jmartinezlago/Library/Application Support/Anki2/addons21/900801631/morph/mecab_wrapper.py", line 118, in spawnMecab
    raise OSError(
OSError: Unexpected MeCab dictionary format; unidic or ipadic required.
Try installing the 'Mecab Unidic' or 'Japanese Support' addons,
or if using your system's `mecab` try installing a package
like `mecab-ipadic`

I have Japanese Support installed.

edoreld commented 4 years ago

Fixed through the instructions here https://www.reddit.com/r/LearnJapanese/comments/g8ngtm/how_did_you_guys_update_your_mecab_unidic/fow4xto/?context=8&depth=9