#3946 Expecting value: line 1 column 1 (char 0):Traceback (most recent call last): File "videotrans\translator\_base.py", lin

208.87* Posted at: 19 hours ago 👁15

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 96, 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\__init__.py", line 900, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_transapi.py", line 44, in _item_task
File "requests\models.py", line 980, in json
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

1 Replies

这是由于翻译渠道的 API 响应不是有效的 JSON 格式导致的。通常是因为网络代理未正确配置、API 地址或密钥错误,或者服务端返回了非 JSON 内容(如 HTML 错误页面)。

解决方案:

  1. 检查网络代理:如果您使用的翻译服务(如 Google、OpenAI、Gemini)在国内无法直接访问,必须在主界面的“网络代理地址”中填写正确的代理地址(格式如 http://127.0.0.1:10808)。如果没有代理,请留空并改用国内可访问的服务。
  2. 验证 API 配置:前往 菜单 -> 翻译设置,检查您当前使用的翻译渠道(如 OpenAI、DeepSeek)的 API URL 和 API Key 是否正确无误。
  3. 降低请求频率:在 菜单 -> 工具 -> 高级选项 -> 字幕翻译调整 中,将 翻译后暂停秒 设置为 3-5 秒,并将 AI翻译渠道每批字幕行数 适当调小(例如设为 5-10 行),以减少请求压力。
  4. 切换翻译渠道:暂时切换到无需代理的免费渠道(如“微软翻译”)进行测试,以排除网络或特定 API 的问题。

请查阅相关文档:

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.

Related resource