jdlorimer / chinese-support-redux

Anki add-on providing support for Chinese study
https://ankiweb.net/shared/info/1128979221
GNU General Public License v3.0
101 stars 50 forks source link

Chinese Redux problem (maybe cantonese related) #190

Closed rudyeikichi closed 2 years ago

rudyeikichi commented 3 years ago

Tried to use the addon Chinese Support Redux v0.14.2 for cards in Cantonese: not working at all. Try to press TAB button to update new card containing only HAnzi field written, but nothing (two errors pasted at the end). Used the addon for long time (with mandarin chinese), no big problems until now. started and restarted many times with addon turned off and turned on, but no change. I thought the problem could be the update: tried many times to update it unsuccessfully so gave up long time ago. but today with this problem I tried again and (finally) successfully updated it. The rpoblem anyway still persists. I guess is something about the jyutping so turned to normal pinyin, but problem now also there. Now I create a new User to create the cards in cantonese (to not mess with old cards). I don't know how to solve it. My knowledge of coding is limited to how to use span/class/div/br (all learnt by using this addon), so please be patient if I don't undertand other coding commands or slang specific to coding.

To tell you the whole truth once (today) it worked with only one card (的), but don't undertand why immediately after stopped; but since I don't remember what was different cannot be more helpful.

Thank you in advance, Great Addon btw!

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-06-22 10:27:52

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 37, in cmd File "aqt\webview.py", line 123, in _onCmd File "aqt\webview.py", line 547, in _onBridgeCmd File "aqt\editor.py", line 403, in onBridgeCmd File "aqt\gui_hooks.py", line 1487, in call File "anki\hooks.py", line 594, in runFilter File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 311, in update_fields fill_all_defs(hanzi, copy) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 96, in fill_all_defs fill_def(hanzi, note, lang='en'), File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 74, in fill_def classifier = get_classifier(hanzi, note) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 45, in get_classifier cs = dictionary.get_classifiers(hanzi) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\database.py", line 219, in get_classifiers self.c.execute( sqlite3.ProgrammingError: Cannot operate on a closed database.

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-06-22 10:27:52

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 37, in cmd File "aqt\webview.py", line 123, in _onCmd File "aqt\webview.py", line 547, in _onBridgeCmd File "aqt\editor.py", line 403, in onBridgeCmd File "aqt\gui_hooks.py", line 1487, in call File "anki\hooks.py", line 594, in runFilter File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 315, in update_fields fill_color(hanzi, copy) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 186, in fill_color field = get_first(config['fields'][field_group], note) KeyError: 'jyutping'

rudyeikichi commented 3 years ago

another try: 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-06-22 10:27:52

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 37, in cmd File "aqt\webview.py", line 123, in _onCmd File "aqt\webview.py", line 547, in _onBridgeCmd File "aqt\editor.py", line 403, in onBridgeCmd File "aqt\gui_hooks.py", line 1487, in call File "anki\hooks.py", line 594, in runFilter File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 315, in update_fields fill_color(hanzi, copy) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 186, in fill_color field = get_first(config['fields'][field_group], note) KeyError: 'jyutping'

joeminicucci commented 3 years ago

Hello @rudyeikichi Please give the volunteers a step-step reproduction breakdown of the problem. Jyutping is unfortunately unsupported currently.

If you receive the sqlite3.ProgrammingError: Cannot operate on a closed database. error, this means that the database was opened and left in an open state, probably by the Jyutping selection / error throw, and was not closed properly. Try closing your Anki client and terminating all sqlite processes / daemons in the background or restarting your machine if you run into this problem again.

rudyeikichi commented 2 years ago

Hello @joeminicucci step 1: create template cantonese cards with the following fields:Hanzi, Color, Cantonese, Alternative, Ruby, rubyCantonese, English, Classifier, Simplified, Traditional, Also Written, Frequency, Silhouette, Sound (I think I will delete most of them later, but for now I leave them there to see which ones fill)

step 2: insert some words to try (的, 街道,雨水) 的, 雨水 Ruby and Cantonese filled correctly (雨水 anyway is filled jyu5seoi2, differently from pleco yúhséui, I don't know much of Cantonese but maybe it's just a different style of pinyin/jyutping) 街道 Ruby and Cantonese not filled, still empty

step 3: thinking it might be a problem of the settings go back to main screen of Anki (desktop), select Chinese, select Phonetics, select Jyutping go back to browse cards and select 街道, press button TAB, got this 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-09-13 18:18:39

Caught exception: Traceback (most recent call last): File "aqt\webview.py", line 37, in cmd File "aqt\webview.py", line 123, in _onCmd File "aqt\webview.py", line 547, in _onBridgeCmd File "aqt\editor.py", line 403, in onBridgeCmd File "aqt\gui_hooks.py", line 1487, in call File "anki\hooks.py", line 594, in runFilter File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 315, in update_fields fill_color(hanzi, copy) File "C:\Users\hp 15bw021nl\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 186, in fill_color field = get_first(config['fields'][field_group], note) KeyError: 'jyutping'

I haven't even tried to use the cantonese version since june, cuz of fear of problems (last time it took me quite a lot of time to get the "normal mandarin" chinese addon working again, since I need to add plenty of cards in mandarin every few and then). Anyway I just tried now to see the steps. If it is unsupported currently it's not a big problem: I was just thinking to try cantonese a bit through Anki, but not too seriously (mandarin is my main target). The other part about sqlite/daemons etc I don't understand it (as I said I don't get most of coding terms): when anki is not working I stop it and eventually try to put the addons as they were before until it works again normally. Don't waste your time explaining me those terms. I appreciate hte effort you and others have put into this amazing addon. Thank you. I'm happy with the main version of it.