Skip to content

[Bug] JSONDecodeError on empty response when fetching voice list #68

@ammarawaisi

Description

@ammarawaisi

Context:

  • Addon Version: Sonata Neural Voices (v3.1)
  • NVDA Version: 2025.1
  • Timestamp of Error: Approx. 00:45 (PKT) on November 3, 2025

Problem Description:
When attempting to download voices from the Voice Manager, the addon fails with a "couldn't fetch" error. The log file confirms this is a hard crash in the JSON parser. It displays "Could not retrieve voice list.
Please check your connection and try again." dialogs when it fails. Even though I have a strong internet connection, this should be a server side issue.

Full Traceback:

ERROR - external:globalPlugins.sonata_tts_global_plugin.voice_manager.OnlineSonataVoicesPanel._voice_list_retrieved_callback (00:45:11.196) - MainThread (13588):
Failed to retreive voices list
Traceback (most recent call last):
  File "...\AppData\Roaming\nvda\addons\sonata_neural_voices\globalPlugins\sonata_tts_global_plugin\voice_manager.py", line 295, in _voice_list_retrieved_callback
  D result = future.result()
             ^^^^^^^^^^^^^^^
  File "concurrent\futures\_base.pyc", line 449, in result
  File "concurrent\futures\_base.pyc", line 401, in __get_result
  File "concurrent\futures\thread.pyc", line 58, in run
  File "...\AppData\Roaming\nvda\addons\sonata_neural_voices\globalPlugins\sonata_tts_global_plugin\voice_download.py", line 500, in get_available_voices
    std_voices = std_resp.json()
                 ^^^^^^^^^^^^^^^
  File "...\AppData\Roaming\nvda\addons\sonata_neural_voices\synthDrivers\sonata_neural_voices\lib\mureq.py", line 235, in json
    return jsonlib.loads(self.body)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "json\__init__.pyc", line 346, in loads
  File "json\decoder.pyc", line 337, in decode
  File "json\decoder.pyc", line 355, in raw_decode
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions