jdlorimer/chinese-support-redux

Error when Speech Engine is Disabled

Closed this issue · 1 comments

Describe the bug
When I select Disabled in the Speech Engine menu, I get an error.

To Reproduce
When I want to add a new word into my Chinese deck, but Speech Engine is Disabled, after entering a word and pressing Tab I get the following error:

Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 10
Flags: frz=True ao=True sv=1

Caught exception:
File "aqt\webview.py", line 27, in cmd
File "aqt\webview.py", line 87, in _onCmd
File "aqt\webview.py", line 368, in _onBridgeCmd
File "aqt\editor.py", line 273, in onBridgeCmd
File "anki\hooks.py", line 39, in runFilter
File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1128979221\edit.py", line 74, in onFocusLost
if update_fields(note, field, allFields):
File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 267, in update_fields
fill_sound(hanzi, copy)
File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 169, in fill_sound
s = sound(hanzi, config['speech'])
File "C:\Users\HP\AppData\Roaming\Anki2\addons21\1128979221\sound.py", line 38, in sound
if source.count('|') != 1:
<class 'AttributeError'>: 'NoneType' object has no attribute 'count'

Specs (please complete the following information):

  • OS: Windows 10
  • Anki 2.1.15 (442df9d6)
  • Chinese Support Version v0.11.5

Thanks. This is fixed in the upcoming release.