#1241 requests.exceptions.InvalidURL: Invalid URL 'http:/translate': No host supplied

114.227* Posted at: 11 hours ago 👁7

翻译字幕阶段出错:[DeepLx] 请求地址格式不正确,请检查配置:
Traceback (most recent call last):
File "videotrans\task\job.py", line 146, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 883, in run
File "videotrans\translator\_base.py", line 81, in run
File "videotrans\translator\_base.py", line 99, 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 400, in
File "concurrent\futures\_base.py", line 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_deeplx.py", line 63, in _item_task
File "requests\api.py", line 115, in post
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 575, in request
File "requests\sessions.py", line 484, in prepare_request
File "requests\models.py", line 367, in prepare
File "requests\models.py", line 444, in prepare_url
requests.exceptions.InvalidURL: Invalid URL 'http:/translate': No host supplied


=
system:Windows-10-10.0.19045-SP0
version:v3.82
frozen:True
language:zh
root_dir:D:/videotrans

1 Replies

这个错误是由于 DeepLx 翻译渠道的配置地址格式不正确导致的。错误信息显示 URL 格式为 'http:/translate',缺少了正确的协议和主机名。

请按以下步骤检查和修正:

  1. 在菜单栏选择 翻译设置
  2. 在翻译渠道中选择 DeepLx
  3. 检查 DeepLx API 地址 字段的配置:

    • 正确的格式应该是完整的 URL,例如:http://127.0.0.1:1188/translate
    • 确保包含完整的协议(http:// 或 https://)、主机地址和端口号

如果您使用的是本地部署的 DeepLx 服务,请确认:

  • DeepLx 服务是否正在运行
  • 服务地址和端口号是否正确
  • 网络连接是否正常

如果问题仍然存在,建议暂时切换到其他翻译渠道(如 Google 翻译)来完成当前任务。

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

Trending Questions