#5479 AttributeError: 'InvalidURL' object has no attribute 'message'

39.163* Posted at: 5 hours ago

Traceback (most recent call last):
File "videotrans\task\job.py", line 113, in run
File "videotrans\task\_speech2text.py", line 146, in recogn
File "videotrans\recognition\__init__.py", line 214, in run
File "videotrans\recognition\_base.py", line 80, in run
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\recognition\_stt.py", line 65, in _exec
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:/api': No host supplied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 118, in run
File "videotrans\configure\_except.py", line 440, in get_msg_from_except
File "videotrans\configure\_except.py", line 292, in
AttributeError: 'InvalidURL' object has no attribute 'message'


=
system:Windows-10-10.0.19045-SP0
version:v3.92
frozen:True
language:zh
root_dir:F:/解说配音软件

1 Replies

此错误是由于语音识别阶段调用的 API 地址格式错误导致的。日志显示 Invalid URL 'http:/api': No host supplied,表示您在主界面或菜单设置中填写的某个 API 地址缺少了主机部分(如 127.0.0.1 或具体域名)。

解决方案:

  1. 检查代理设置
    确保主界面底部或菜单「工具 → 高级选项 → 通用设置」中的代理文本框格式正确,例如 http://127.0.0.1:7890,而不是 http:/apihttp:// 后直接跟端口。
  2. 检查自定义 API 地址
    如果您启用了「自定义语音识别API」、「本地大模型API」或「兼容AI/本地模型」等渠道,请进入对应的设置面板(如菜单「语音识别设置」或「翻译设置」),确认地址字段填写完整,例如 http://127.0.0.1:8000/v1/recognize,不能仅填写 http:/api
  3. 清空无效代理
    如果不需要代理,请将代理文本框清空并保存,避免残留无效地址。

完成修改后重新启动任务即可。如需进一步协助,请提供您填写的代理或API地址截图。

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. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist