#7072 Connection error.Traceback (most recent call last):

203.175**3 Posted at: 1 hour ago

Connection error.
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\http_proxy.py", line 289, in handle_request
File "httpcore\_sync\connection.py", line 99, in handle_request
File "httpcore\_sync\connection.py", line 76, in handle_request
File "httpcore\_sync\connection.py", line 122, in _connect
File "httpcore\_backends\sync.py", line 205, in connect_tcp
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
File "openai\_base_client.py", line 1005, in request
File "httpx\_client.py", line 914, in send
File "httpx\_client.py", line 942, in _send_handling_auth
File "httpx\_client.py", line 979, in _send_handling_redirects
File "httpx\_client.py", line 1014, in _send_single_request
File "httpx\_transports\default.py", line 249, in handle_request
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
File "videotrans\task\_only_one.py", line 65, in run
File "videotrans\task\trans_create.py", line 678, in trans
File "videotrans\translator\__init__.py", line 1000, in run
File "videotrans\translator\_base.py", line 100, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_localllm.py", line 49, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1211, in create
File "openai\_base_client.py", line 1297, in post
File "openai\_base_client.py", line 1037, in request
openai.APIConnectionError: Connection error.


=
system:Windows-10-10.0.22631-SP0
version:v3.99
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v3.99-428

1 Replies

#1 DeepSeek reply at 1 hour ago

这是连接错误:软件尝试连接你配置的「兼容AI/本地模型」翻译接口,但该地址上的服务没有启动或端口/地址配置错误,导致连接被拒绝(WinError 10061)。

请按以下顺序排查:

  1. 检查 API 地址格式
    进入 菜单 → 翻译设置 → 兼容AI/本地模型,确认填写的地址是类似 http://127.0.0.1:端口号http://你的服务器IP:端口号

    • 不要使用 0.0.0.0,软件不支持,请改为 127.0.0.1
    • 确认端口号正确,例如 Ollama 默认是 11434,LM Studio 默认是 1234,GPT-SoVITS 是 9880(API 端口,不是 WebUI 的 7860)。
  2. 确认本地服务已经启动
    你选择的本地大模型服务(如 Ollama、LM Studio、GPT-SoVITS、vLLM 等)必须先成功启动,并监听在对应端口。如果服务没有运行,就会报“目标计算机积极拒绝”。请打开你部署的服务界面,确认其运行正常且端口可访问。
  3. 检查代理设置
    在主界面 对齐控制 行右侧的“网络代理”文本框中:

    • 如果是本地服务(127.0.0.1),请清空代理,本地服务会自动绕过代理;
    • 如果填写了无效代理地址,会导致所有网络请求失败。
      正确格式为 http://127.0.0.1:代理端口socks5://127.0.0.1:代理端口,且代理必须正在运行。
  4. 如果使用的是第三方中转 API
    确认填写的地址正确、密钥有效、网络可连通。也可以尝试在浏览器中直接访问该地址,看能否返回正常响应。
  5. 升级软件版本
    你的版本是 v3.99,建议升级到最新版 v4.11,旧版本可能存在已修复的兼容性问题。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource