#5701 requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

104.194* Posted at: 4 hours ago

Expecting value: line 1 column 1 (char 0):
Traceback (most recent call last):
File "requests\models.py", line 976, in json
File "simplejson\__init__.py", line 514, in loads
File "simplejson\decoder.py", line 386, in decode
File "simplejson\decoder.py", line 416, in raw_decode
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 21, in run
File "videotrans\tts\__init__.py", line 207, in run
File "videotrans\tts\_base.py", line 133, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_chattts.py", line 32, in _run
File "requests\models.py", line 980, in json
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


=
system:Windows-10-10.0.26200-SP0
version:v4.05
frozen:True
language:zh
root_dir:D:/pyVideoTrans

1 Replies

这是由于 ChatTTS 本地服务未运行或 API 地址填写不正确导致的。请求返回了非 JSON 数据(通常是 HTML 错误页面),说明软件未能成功连接到 ChatTTS 服务。

解决方案:

  1. 确保 ChatTTS 服务已启动:请确认你已按照文档部署并启动了 ChatTTS 的 API 服务,且服务正在正常运行。
  2. 检查 API 地址配置:在软件菜单 TTS设置ChatTTS 中,检查 API 地址是否正确。默认地址应为 http://127.0.0.1:9966,注意端口号需与你实际部署的服务端口一致。
  3. 验证服务可访问:在浏览器中直接访问该 API 地址(例如 http://127.0.0.1:9966),检查是否能正常返回内容(通常返回提示信息而非错误页面)。
  4. 检查防火墙/网络代理:确保没有防火墙阻止本地连接,且软件主界面代理文本框已清空(本地服务不走代理)。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource