Open russell359 opened 3 years ago
The pinyin readings generate fine, so it seems to be a problem when converting from pinyin to bopomofo.
This is the text it fails on "陽光露臉,鳥兒唱歌。" I think it might be failing on the conversion of 'r' to ㄦ
Just noticed this is the last line of the error message "ValueError: Not a valid syllable: r5" so it's not just 'might be', it is, so it's a problem with dragonmapper.
Thanks for this! Looks like you've really nailed down the issue. We're going to add this to our list of known bugs for the addon and we'll work on fixing it as soon as possible.
Thank you for your continued support and happy immersing 😄
Kieran
When I run the get readings for my Hanzi cards I get this error
" 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-01-26 11:37:14
Caught exception: Traceback (most recent call last): File "C:\Users\russe\AppData\Roaming\Anki2\addons21\1792056402\dragonmapper\transcriptions.py", line 230, in pinyin_syllable_to_zhuyin zhuyin_syllable = _PINYIN_MAP[pinyin_syllable.lower()]['Zhuyin'] KeyError: 'r'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\russe\AppData\Roaming\Anki2\addons21\498302176\main.py", line 197, in
b4.clicked.connect(lambda: mw.MigakuChinese.massGenerate(cb.currentText(), destCB.currentText(), omCB.currentText(), rtCB.currentText().lower(), notes, generateWidget))##add in the vars
File "C:\Users\russe\AppData\Roaming\Anki2\addons21\498302176\chineseHandler.py", line 87, in massGenerate
newText = self.finalizeReadings(text,note, og, rType = rt)
File "C:\Users\russe\AppData\Roaming\Anki2\addons21\498302176\chineseHandler.py", line 252, in finalizeReadings
results[idx] = self.bopoToneToNumber(transcriptions.pinyin_to_zhuyin(fayin))
File "C:\Users\russe\AppData\Roaming\Anki2\addons21\1792056402\dragonmapper\transcriptions.py", line 380, in pinyin_to_zhuyin
return _convert(s, zhon.pinyin.syllable, pinyin_syllable_to_zhuyin,
File "C:\Users\russe\AppData\Roaming\Anki2\addons21\1792056402\dragonmapper\transcriptions.py", line 357, in _convert
new += syllable_function(match.group())
File "C:\Users\russe\AppData\Roaming\Anki2\addons21\1792056402\dragonmapper\transcriptions.py", line 232, in pinyin_syllable_to_zhuyin
raise ValueError('Not a valid syllable: %s' % s)
ValueError: Not a valid syllable: r5
"