#6133 [localllm] 无法连接到 http://127.0.0.1:8080/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动Request timed out.

206.71* Posted at: 14 hours ago

[localllm] 无法连接到 http://127.0.0.1:8080/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动
Request timed out.
Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 250, in handle_request
File "httpcore\_sync\connection_pool.py", line 216, in handle_request
File "httpcore\_sync\connection_pool.py", line 196, in handle_request
File "httpcore\_sync\connection.py", line 101, in handle_request
File "httpcore\_sync\http11.py", line 143, in handle_request
File "httpcore\_sync\http11.py", line 113, in handle_request
File "httpcore\_sync\http11.py", line 186, in _receive_response_headers
File "httpcore\_sync\http11.py", line 224, in _receive_event
File "httpcore\_backends\sync.py", line 124, in read
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ReadTimeout: timed out

The above exception was the direct cause of
......
e 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1055, in request
openai.APITimeoutError: Request timed out.

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

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 73, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 63, in run
File "videotrans\translator\_base.py", line 68, in run
File "videotrans\translator\_base.py", line 107, 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 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 79, in _item_task
videotrans.configure.excepts.StopTask: [localllm] 无法连接到 http://127.0.0.1:8080/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动
Request timed out.

cfg=[TaskCfgVTT]当前工作模式: 翻译视频或音频 单视频模式
原始输入文件名: C:/Users/Anana/Downloads/Clipto AI Video Downloader I Simplified Wan Animate into One Easy Workflow.mp4,
输出结果保存到文件夹: C:/Users/Anana/Downloads/_video_out/Clipto AI Video Downloader I Simplified Wan Animate into One Easy Workflow-mp4,
临时文件夹: D:/Ai/win-pyvideotrans-v4.07/tmp/4072/4f50ecc167
已选 清理已存在
已选 启用CUDA加速
未选 降噪
语音识别:faster-whisper(本地内置), model_name: distil-large-v3.5, 发音语言: 英语, 断句方式:默认断句
翻译渠道:兼容AI/本地模型,原始语言:英语,目标语言:简体中文, 未选 发送完整字幕
配音渠道:Edge-TTS(免费), 角色:Yunyang(Male/CN), 配音语言:简体中文, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
字幕: 嵌入硬字幕(双) 目标语言在上双字幕
代理地址:


=
system:Windows-10-10.0.26200-SP0
version:v4.07
frozen:True
language:zh
root_dir:D:/Ai/win-pyvideotrans-v4.07

1 Replies

原因是使用的「兼容AI/本地模型」翻译渠道配置的 API 地址 http://127.0.0.1:8080/ 无响应,请求超时。这通常是因为本地部署的大模型服务没有启动,或 API 地址、端口配置错误。

请按以下步骤排查:

  1. 确认服务已启动:打开命令行,检查部署的本地大模型(如 Ollama、vLLM、openai-api 等)是否正在运行,且监听端口是否为 8080。
  2. 测试 API 连通性:在浏览器中访问 http://127.0.0.1:8080/v1/chat/completions,或使用 curl 命令测试,看能否返回正常响应。
  3. 检查 API 地址格式:在软件设置中确认 菜单 → 翻译设置 → 兼容AI/本地模型设置 里填写的地址末尾没有多余斜杠或空格,确保格式为 http://127.0.0.1:8080
  4. 防火墙/杀毒软件干扰:临时关闭 Windows 防火墙或杀毒软件,测试是否可以连接。
  5. 更换端口:如果本地服务使用了其他端口(如 11434、8000 等),请修改软件中的 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 via ko-fi.com

Dondate via PayPal

Related resource