#8544 404 Client Error: Not Found for url: http://127.0.0.1:8686/v1/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A

107.172**1 Posted at: 2 hours ago

404 Client Error: Not Found for url: http://127.0.0.1:8686/v1/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret


(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 33, in _item_task
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://127.0.0.1:8686/v1/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret



=
system:Windows-10-10.0.26300-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.15

1 Replies

#1 DeepSeek reply at 2 hours ago

核心原因:这不是软件本身故障,而是「自定义翻译 API」渠道所指向的本地服务没有提供对应的接口路径,因此返回 404。从报错 URL http://127.0.0.1:8686/v1/?... 可以看出软件已成功连接到本地 8686 端口,只是该端口上的服务没有 /v1/ 这个路由。

处理办法:

  1. 确认 8686 端口上运行的到底是什么服务。自定义翻译 API 渠道要求服务方按 pyVideoTrans 规定的数据格式(GET 参数 text/source_language/target_language/secret,返回指定 JSON)响应,普通第三方服务或自建脚本路径不一致都会报 404。
  2. 若你部署的是 LibreTranslate,请不要填在「自定义翻译API」里,应改选翻译渠道下拉中的 LibreTranslate,其接口路径通常是 /translate,不是 /v1/。
  3. 若你部署的是 DeepLX,请选 DeepLX 渠道。
  4. 若你只是想先跑通流程,可先把翻译渠道换成 Microsoft(免费) 或 Google(免费) 测试,排除翻译渠道配置问题。
  5. 检查 菜单 → 翻译设置 → 自定义翻译API 里的 API 地址是否多填或漏填了路径(例如应为 http://127.0.0.1:8686/v1/ 还是 http://127.0.0.1:8686/translate),并确认服务端日志中是否收到该请求。

补充:API 地址不可填写 0.0.0.0,本地服务请统一使用 127.0.0.1。

请查阅相关文档:

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