#2413 openai.InternalServerError: Error code: 503

38.207* Posted at: 2 hours ago 👁4

503 错误: API服务端内部错误 Error code: 503:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 910, in run
File "videotrans\translator\_base.py", line 80, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_localllm.py", line 54, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1156, in create
File "openai\_base_client.py", line 1259, in post
File "openai\_base_client.py", line 1047, in request
openai.InternalServerError: Error code: 503


=
system:Windows-10-10.0.26200-SP0
version:v3.86
frozen:True
language:zh
root_dir:C:/My Program Portable/win-pyvideotrans-v3.86

1 Replies

这个错误表明您在使用“本地大模型/国产AI”翻译渠道时,连接的服务端(可能是您自己部署的Ollama、LM Studio等)返回了503内部服务器错误。这通常是服务端本身的问题,而非pyVideoTrans客户端配置错误。

请按以下步骤排查:

  1. 确认本地大模型服务是否正常运行

    • 打开您部署本地大模型的软件(如Ollama、LM Studio、text-generation-webui等)。
    • 检查模型是否已成功加载,服务端口(如http://127.0.0.1:11434)是否可访问。您可以在浏览器中尝试访问该地址,看是否有响应。
  2. 在pyVideoTrans中检查配置

    • 在软件主界面,点击“翻译设置”按钮。
    • 在“翻译渠道”下拉菜单中,选择您正在使用的“本地大模型/国产AI”。
    • 点击“设置”按钮,检查“API地址”是否正确指向了您的本地服务地址(例如 http://127.0.0.1:11434/v1)。
    • 重要:确保地址末尾的 /v1 路径正确(这是OpenAI兼容接口的标准路径)。
  3. 重启服务

    • 尝试完全关闭并重新启动您的本地大模型服务,然后再次在pyVideoTrans中测试翻译。
  4. 查看服务端日志

    • 打开您本地大模型服务的日志窗口,查看在pyVideoTrans请求时,服务端是否抛出了更详细的错误信息(如显存不足、模型加载失败等)。
  5. 临时解决方案

    • 如果急需完成翻译,可以暂时切换到其他翻译渠道,如“Google翻译”(需代理)或“微软翻译”。

核心问题定位:503错误意味着服务端“不可用”。问题根源极大概率在您本地运行的AI模型服务上,而非pyVideoTrans软件本身。

请查看更多参考文档:

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

Similar issues already exist

Trending Questions