#2704 requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5000/translate

2407:cdc0* Posted at: 1 hour ago 👁4

500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5000/translate:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 96, 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\__init__.py", line 935, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_libre.py", line 53, in _item_task
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: http://127.0.0.1:5000/translate


=
system:Windows-10-10.0.26200-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/A

1 Replies

您遇到的错误是 LibreTranslate 本地翻译服务返回了 500 内部服务器错误。这通常是由于 LibreTranslate 服务本身未正确启动、配置错误或处理请求时崩溃导致的。

请按以下步骤排查:

  1. 确认 LibreTranslate 服务状态

    • 检查 LibreTranslate 是否已在 http://127.0.0.1:5000 上成功启动并运行。您可以在浏览器中访问 http://127.0.0.1:5000,如果看到 LibreTranslate 的 Web 界面,说明服务是正常的。
    • 如果服务未启动,您需要先启动它。通常启动命令类似 libretranslate./libretranslate(取决于您的安装方式)。
  2. 检查 LibreTranslate 日志

    • 查看 LibreTranslate 服务启动时的终端输出或日志文件,确认是否有错误信息(如模型加载失败、端口冲突等)。
  3. 在 pyVideoTrans 中重新配置

    • 在 pyVideoTrans 主界面,点击“翻译设置”按钮。
    • 在“翻译渠道”中选择“LibreTranslate”。
    • 在“API地址”中,确保填写的是 http://127.0.0.1:5000(如果您的 LibreTranslate 运行在其他端口,请相应修改)。
    • 点击“保存”并重新测试。
  4. 尝试其他翻译渠道(临时解决方案)

    • 如果 LibreTranslate 问题暂时无法解决,可以切换到其他翻译渠道,例如“Google翻译”(需配置代理)或“Microsoft翻译”等。
  5. 重启服务

    • 尝试完全关闭 LibreTranslate 服务,然后重新启动它。

如果以上步骤无法解决问题,请提供 LibreTranslate 服务启动时的完整日志,以便进一步分析。

请查看更多参考文档:

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