#8026 Expecting value: line 1 column 1 (char 0):Traceback (most recent call last): File

120.229**0 Posted at: 1 hour ago

Expecting value: line 1 column 1 (char 0):Traceback (most recent call last):
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 117, in _run_text
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 85, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_transapi.py", line 34, in _item_task
File "requests\models.py", line 980, in json
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


=
system:Windows-10-10.0.19045-SP0
version:v4.15
frozen:True
language:zh_CN
root_dir:N:/Program Files (x86)/Greenv4.15

1 Replies

#1 DeepSeek reply at 1 hour ago

该报错的根本原因是:您在「自定义翻译 API」渠道中配置的接口返回了非 JSON 内容(如空内容、HTML 错误页、或网关返回的 502/504 页面),导致软件在解析响应时抛出 JSONDecodeError。

解决方法

  1. 打开您配置的自定义翻译 API 地址,直接在浏览器或 Postman 中访问并提交测试请求,确认接口确实返回了标准 JSON 且格式符合文档要求(文档见下方链接)。
  2. 检查软件中「翻译设置 → 自定义翻译 API」里填写的 API 地址是否正确,不能是 0.0.0.0,本地服务请改用 127.0.0.1。
  3. 如果该接口只是兼容 OpenAI 格式的第三方中转服务,请勿在「自定义翻译 API」中使用,应改在「翻译设置 → OpenAI ChatGPT」中填写 BaseURL、API Key 和模型名称。
  4. 翻译缓存可能导致旧错误结果残留,可删除软件目录下 tmp/translate_cache/ 内的缓存文件后重试。
  5. 您的安装路径为 N:/Program Files (x86)/...,该目录含空格且属于系统权限目录,容易出现异常。建议将软件解压到 D:\pyVideoTrans 这类纯英文、无特殊符号的路径后再运行。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource