jdlorimer / chinese-support-redux

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

Cantonese pinyin does not work #191

Open asphoa opened 3 years ago

asphoa commented 3 years ago

Describe the bug Cantonese pinyin does not work

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Edit Current'
  2. Click on 'Chinese Support'
  3. Scroll down to Field: 'Cantonese'
  4. See error

Expected behavior Cantonese Pinyin automatically being filled in expected

Screenshots Bildschirmfoto 2021-06-23 um 03 30 57

Specs (please complete the following information):

Additional context

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, repeat 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-ons section of our support site. Debug info: Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.16 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-06-23 00:04:48 Add-ons possibly involved: ⁨Chinese Support Redux v0142⁩

Caught exception: Traceback (most recent call last): File "aqt/webview.py", line 36, in cmd File "aqt/webview.py", line 135, in _onCmd File "aqt/webview.py", line 580, in _onBridgeCmd File "aqt/editor.py", line 451, in onBridgeCmd File "aqt/hooks_gen.py", line 1547, in call File "anki/hooks.py", line 45, in runFilter File "/Users/asphodelos/Library/Application Support/Anki2/addons21/1128979221/edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "/Users/asphodelos/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 315, in update_fields fill_color(hanzi, copy) File "/Users/asphodelos/Library/Application Support/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

Thank you for the report @asphoa Jyutping is currently unsupported. I apologize for the inconvenience. Can you get this to work with the addon set to Pinyin mode?

joeminicucci commented 3 years ago

@asphoa Also can you please provide the raw input you are placing in the Hanzi field so that we can reproduce the bug?

GrandEtho commented 2 years ago

I also experience this bug and can provide some additional information. This works fine when the addon is set to Pinyin mode and the raw input I am proving is 大家。 image