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

Pop-up when making cards #140

Open katinayong opened 4 years ago

katinayong commented 4 years ago

Whenever I create a card I get the following error message. The app continues to work and fills in the blanks.

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.26 (70784154) Python 3.8.0 Qt 5.13.1 PyQt 5.14.1 Platform: Mac 10.15.5 Flags: frz=True ao=True sv=1 Add-ons, last update check: 2020-07-09 13:41:42 Add-ons possibly involved: ⁨Chinese Support Redux v0140⁩

--- Logging error --- Traceback (most recent call last): File "logging/init.py", line 1084, in emit UnicodeEncodeError: 'ascii' codec can't encode character '\u4f60' in position 96: ordinal not in range(128) Call stack: File "runankimac", line 12, in File "aqt/init.py", line 368, in run File "aqt/init.py", line 514, in _run File "aqt/webview.py", line 34, in cmd File "aqt/webview.py", line 114, in _onCmd File "aqt/webview.py", line 518, in _onBridgeCmd File "aqt/editor.py", line 393, in onBridgeCmd File "aqt/gui_hooks.py", line 1202, in call File "anki/hooks.py", line 594, in runFilter File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 270, in update_fields fill_sound(hanzi, copy) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 169, in fill_sound s = sound(hanzi, config['speech']) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/sound.py", line 51, in sound return '[sound:%s]' % AudioDownloader(hanzi, source).download() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 50, in download self.func() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 56, in get_google tts.save(self.path) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/lib/gtts/tts.py", line 243, in save self.write_to_fp(f) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/lib/gtts/tts.py", line 200, in write_to_fp log.debug("payload-%i: %s", idx, payload) File "logging/init.py", line 1422, in debug File "logging/init.py", line 1577, in _log File "logging/init.py", line 1587, in handle File "logging/init.py", line 1649, in callHandlers File "logging/init.py", line 950, in handle File "logging/init.py", line 1183, in emit File "logging/init.py", line 1089, in emit Unable to print the message and arguments - possible formatting error. Use the traceback above to help find the error. --- Logging error --- Traceback (most recent call last): File "logging/init.py", line 1084, in emit UnicodeEncodeError: 'ascii' codec can't encode character '\u4f60' in position 179: ordinal not in range(128) Call stack: File "runankimac", line 12, in File "aqt/init.py", line 368, in run File "aqt/init.py", line 514, in _run File "aqt/webview.py", line 34, in cmd File "aqt/webview.py", line 114, in _onCmd File "aqt/webview.py", line 518, in _onBridgeCmd File "aqt/editor.py", line 393, in onBridgeCmd File "aqt/gui_hooks.py", line 1202, in call File "anki/hooks.py", line 594, in runFilter File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 270, in update_fields fill_sound(hanzi, copy) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 169, in fill_sound s = sound(hanzi, config['speech']) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/sound.py", line 51, in sound return '[sound:%s]' % AudioDownloader(hanzi, source).download() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 50, in download self.func() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 56, in get_google tts.save(self.path) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/lib/gtts/tts.py", line 243, in save self.write_to_fp(f) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/lib/gtts/tts.py", line 226, in write_to_fp log.debug("part-%i written to %s", idx, fp) File "logging/init.py", line 1422, in debug File "logging/init.py", line 1577, in _log File "logging/init.py", line 1587, in handle File "logging/init.py", line 1649, in callHandlers File "logging/init.py", line 950, in handle File "logging/init.py", line 1183, in emit File "logging/init.py", line 1089, in emit Unable to print the message and arguments - possible formatting error. Use the traceback above to help find the error. --- Logging error --- Traceback (most recent call last): File "logging/init.py", line 1084, in emit UnicodeEncodeError: 'ascii' codec can't encode character '\u4f60' in position 137: ordinal not in range(128) Call stack: File "runankimac", line 12, in File "aqt/init.py", line 368, in run File "aqt/init.py", line 514, in _run File "aqt/webview.py", line 34, in cmd File "aqt/webview.py", line 114, in _onCmd File "aqt/webview.py", line 518, in _onBridgeCmd File "aqt/editor.py", line 393, in onBridgeCmd File "aqt/gui_hooks.py", line 1202, in call File "anki/hooks.py", line 594, in runFilter File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/edit.py", line 74, in onFocusLost if update_fields(note, field, allFields): File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 270, in update_fields fill_sound(hanzi, copy) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/behavior.py", line 169, in fill_sound s = sound(hanzi, config['speech']) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/sound.py", line 51, in sound return '[sound:%s]' % AudioDownloader(hanzi, source).download() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 50, in download self.func() File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/tts.py", line 56, in get_google tts.save(self.path) File "/Users/mokoyo/Library/Application Support/Anki2/addons21/1128979221/lib/gtts/tts.py", line 244, in save log.debug("Saved to %s", savefile) File "logging/init.py", line 1422, in debug File "logging/init.py", line 1577, in _log File "logging/init.py", line 1587, in handle File "logging/init.py", line 1649, in callHandlers File "logging/init.py", line 950, in handle File "logging/init.py", line 1183, in emit File "logging/init.py", line 1089, in emit Unable to print the message and arguments - possible formatting error. Use the traceback above to help find the error.

jdlorimer commented 3 years ago

This seems related to the ongoing gTTS problems. If so, this issue will be consolidated with the gTTS reports and managed as a group.