The Ana Windows voice from CereProc reports to Windows that it supports both es_MX and es_US languages. Anki’s TTS field replacement logic crashes when it queries the voice’s language support – it expects one language code, not two. AwesomeTTS has always worked fine with the problematic voice for batch generation. Uninstalling the problematic voice from Windows prevents Anki’s TTS logic from crashing but of course then the voice can’t be used. For this problematic voice at least, a potential fix would be to use just one of the codes; either is fine.
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.49 (dc80804a) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-01-14 14:25:48
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 41, in cmd
File "aqt\webview.py", line 142, in _onCmd
File "aqt\webview.py", line 595, in _onBridgeCmd
File "aqt\overview.py", line 91, in _linkHandler
File "aqt\main.py", line 672, in moveToState
File "aqt\main.py", line 694, in _reviewState
File "aqt\reviewer.py", line 141, in show
File "aqt\reviewer.py", line 161, in refresh_if_needed
File "aqt\reviewer.py", line 211, in nextCard
File "aqt\reviewer.py", line 321, in _showQuestion
File "aqt\sound.py", line 153, in play_tags
File "aqt\sound.py", line 204, in _play_next_if_idle
File "aqt\sound.py", line 207, in _play
File "aqt\sound.py", line 218, in _best_player_for_tag
File "aqt\tts.py", line 110, in rank_for_tag
File "aqt\tts.py", line 75, in voice_for_tag
File "aqt\tts.py", line 71, in voices
File "aqt\tts.py", line 489, in get_available_voices
File "aqt\tts.py", line 493, in _voice_to_object
File "aqt\tts.py", line 476, in lcid_hex_str_to_lang_code
ValueError: invalid literal for int() with base 16: '80a;540a'
0x80a =2,048 = “es_MX”
0x540a = 21,514 = “es_US”
Thanks!
P.S. To post this bug I couldn’t create a forum account using my hotmail email – the confirmation email never gets through (yes, I checked the spam folder, tried multiple times, and waited a day). With a gmail account the confirmation email came through instantly. Oddly, email to my hotmail account from noreply@ankiweb.net (as for email address verification) makes it, no problem.