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

*155.56* Posted at: 5 hours ago 👁7

操作系统错误 (None): None:Traceback (most recent call last):

File "videotrans\translator\_base.py", line 79, in run

File "videotrans\translator\_base.py", line 97, 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 17, in run

File "videotrans\translator\__init__.py", line 820, 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 45, in _item_task

File "requests\models.py", line 980, in json

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

=====

Windows-10-10.0.22631-SP0

version:v3.80

frozen:True

language:zh

2 Replies

啥意思?

本条内容由 DeepSeek 回复
这个问题是由于在使用AI翻译渠道时,翻译API返回了非JSON格式的响应导致的JSON解析错误。错误发生在字幕翻译流程中,软件期望收到JSON格式的翻译结果,但实际收到了空响应或非JSON内容。

解决方案:

1. 检查翻译API配置:请确认您在翻译设置中配置的API密钥、接口地址等是否正确有效。特别是如果您使用的是第三方中转API,请确保该服务当前可用。

2. 测试API连接:在软件的翻译设置中,使用"测试"功能验证API是否正常工作。如果测试失败,说明API配置有问题。

3. 查看详细日志:请打开软件目录下的 videotrans/logs/{当前日期}.log 文件,查看底部的详细错误信息,这通常包含API返回的具体响应内容,能帮助确定问题根源。

4. 临时解决方案:如果问题持续存在,可以暂时切换到其他翻译渠道,如Google翻译或百度翻译,完成当前任务。

5. 检查网络连接:如果您使用的是需要科学上网的翻译渠道(如OpenAI、Google翻译等),请确保网络代理设置正确且连接稳定。

该错误通常是由于API服务端问题、网络连接不稳定或配置错误导致的。建议优先检查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.

Donate: https://ko-fi.com/jianchang512

Trending Questions