#4721 FREE GPT API:Traceback (most recent call last): File "videotrans\translator\_base.py", line 72, in run File "videotran

54.199* Posted at: 13 hours ago

FREE GPT API:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 142, in _run_srt
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 855, in run
File "videotrans\translator\_base.py", line 75, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 77, in _item_task
videotrans.configure.excepts.TranslateSrtError: FREE GPT API


=
system:Windows-10-10.0.19044-SP0
version:v4.00
frozen:True
language:zh
root_dir:E:/AI/pyvideotrans

1 Replies

翻译 API 返回了 HTML 页面而非有效 JSON,说明请求被拦截或配置错误。

原因:你使用的翻译渠道(可能是 DeepSeek、OpenAI 兼容接口等)的 API 地址或密钥无效、服务不可用、或被代理/防火墙拦截,导致返回了第三方页面的内容("FREE GPT API")。

解决

  1. 检查 API 地址和密钥:在菜单栏对应翻译渠道设置中,确认 Base URL 和 API Key 填写正确,确保 URL 以 /v1 结尾(如 https://api.deepseek.com/v1)。
  2. 验证密钥有效性:直接使用 curl 或浏览器测试该地址+密钥能否正常返回 JSON(可参考渠道官方文档)。
  3. 切换翻译渠道:暂时改用“免费传统翻译-微软翻译”或“免费传统翻译-Google翻译”测试问题是否复现——若不再报错,则说明原渠道配置有问题。
  4. 检查网络代理:如果你在国内使用国外服务(如 OpenAI),需在软件主界面“网络代理”处填写正确的代理地址(如 http://127.0.0.1:7890);如果本地没有代理,请务必保持留空。
  5. 更换稳定渠道:建议使用官方或商业化翻译接口(如百度、腾讯、阿里机器翻译),避免使用来历不明的免费代理服务。

请查阅相关文档:

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