kaegi / MorphMan

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

error: unclosed character class #249

Closed VoskoWTFreezer closed 2 years ago

VoskoWTFreezer commented 3 years ago

I dont know anything about coding so im really confuse can i get some help please? It happens with only the cards i created yesterday, but i create new ones today and review them, it works? I really dont know what this error is due. Im using the Migaku Japanese, Migaku Dictionnary, Migaku Editor and MeCab Unidic Japanese dictionnay, but they all work. My fields looks like this: image Expression 乱[みだ,みだれる;k3]れた   影[かげ;a] 山[やま;o]   フォロー[;a] Meaning みだれる[,みだれる;k3] 【 乱[みだ,みだれる;k3]れる 】 ★★★ to be disordered, to be disarranged, to be disarrayed, to be disheveled, to be dishevelled Audio [sound:16153325972027676.mp3] Audio Word

Audio on Front

Target 乱[みだ,みだれる;k3]れる

Thanks in advance

Error message: 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-03-11 00:56:08

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 493, in handler File "aqt\reviewer.py", line 329, in _onAnswerButton File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-54>", line 2, in _answerCard File "anki\hooks.py", line 638, in decorator_wrapper File "anki\hooks.py", line 632, in repl File "C:\Users\Momo\AppData\Roaming\Anki2\addons21\900801631\morph\newMorphHelper.py", line 180, in my_reviewer_answerCard markFocusSeen(self, self.card.note()) File "C:\Users\Momo\AppData\Roaming\Anki2\addons21\900801631\morph\newMorphHelper.py", line 94, in markFocusSeen num_skipped = len(self.mw.col.findNotes(q)) - 1 File "anki\collection.py", line 453, in find_notes File "anki\rsbackend_gen.py", line 88, in search_notes File "anki\rsbackend.py", line 267, in _run_command anki.rsbackend.InvalidInput: regex parse error: (?i)(^|,|\s)乱[みだ($|,|\s) ^ error: unclosed character class

triqster1 commented 3 years ago

anki.rsbackend.InvalidInput: regex parse error: (?i)(^|,|\s)乱[みだ($|,|\s) ^ error: unclosed character class

Try if removing the pitch accent stuff from the Target field fixes it. There's no reason why you'd want do put it in there, anyway.

Ceynou commented 2 years ago

anki.rsbackend.InvalidInput: regex parse error: (?i)(^|,|\s)乱[みだ($|,|\s) ^ error: unclosed character class

Try if removing the pitch accent stuff from the Target field fixes it. There's no reason why you'd want do put it in there, anyway.

Maybe his Target field isn't decorative like mine, I transform my sentence cards into vocabs cards after they reach a 1.5 month interval. I don't understand why it's checking that field when it's in reading mode only

ianki commented 2 years ago

This field is used internally by MorphMan and adding decoration will cause several issues. I suggest that when you change the card to vocab, you move this to a different field name which is not the MorphMan Focus Morph field.