#4775 videotrans.configure.excepts.StopTask: 404 page not found

207.174* Posted at: 1 day ago

404 page not found:Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 70, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1211, in create
File "openai\_base_client.py", line 1297, in post
File "openai\_base_client.py", line 1070, in request
openai.NotFoundError: 404 page not found

The above exception was the direct cause of the following exception:

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 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 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 72, in _item_task
videotrans.configure.excepts.StopTask: 404 page not found


=
system:Windows-10-10.0.22631-SP0
version:v4.00
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v4.00-525

1 Replies

这是由于 API 基础地址(Base URL)或模型名称配置错误导致的 404 错误。常见原因有:

  1. Base URL 地址不正确:例如,将 DeepSeek 的地址 https://api.deepseek.com 误写为其他无效地址,或在末尾添加了不必要的路径(如 /v1 等)。
  2. 模型名称拼写错误或不存在:例如将 deepseek-chat 写成 deepseek-chat-v2,或使用了当前渠道不支持的模型名。
  3. 代理设置干扰:如果配置了网络代理,但代理服务器无法访问该 API 地址,也可能导致返回 404。

解决步骤:

  1. 检查翻译渠道的 Base URL

    • 点击菜单栏 翻译设置,找到当前使用的翻译渠道(如 “OpenAI ChatGPT”、“DeepSeek”、“兼容AI/本地模型”等)。
    • 确认填写的 API地址/Base URL 完全正确(无多余空格、斜杠或路径)。常用地址:

      • DeepSeek:https://api.deepseek.com
      • OpenAI:https://api.openai.com/v1
      • 本地 Ollama:http://localhost:11434/v1
    • 注意:有些渠道需要包含 /v1 后缀,有些不需要,请参考对应平台的官方文档。
  2. 核对模型名称

    • 在同一设置面板中,确认 模型名称 字段填写准确。常见模型:

      • DeepSeek:deepseek-chat
      • OpenAI:gpt-4ogpt-4o-mini
      • 本地 Ollama:qwen:latest
  3. 临时关闭代理

    • 如果主界面 网络代理地址 处有填写,先清空该字段(若不确定是否需要代理),重启软件后重试。
  4. 测试连接

    • 可以在软件内点击 测试 按钮(如果有),或在设置中保存后重新尝试翻译单个视频。
  5. 若仍失败:请提供当前使用的翻译渠道名称、填写的 Base URL 和模型名称,以便进一步排查。

请查阅相关文档:

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