#5500 openai.APIConnectionError: Connection error.

116.25* Posted at: 2 hours 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.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.99-428

1 Replies

这是因为软件向您配置的 API 地址发起连接时,该地址上的服务没有启动或拒绝了连接。常见原因有:

  1. 您填写的 API 地址是 0.0.0.0
    → 请修改为 127.0.0.1(例如 http://127.0.0.1:8000)。
  2. 本地部署的服务(如 GPT-SoVITS、F5-TTS 等)还没有启动
    → 请先启动对应的本地服务,确认端口正确且服务就绪。
  3. 端口号填错
    → 检查您填写的端口号是否与服务实际使用的端口一致。
  4. 代理设置影响了连接
    → 如果您在软件中设置了代理,请先清空代理文本框并保存,然后重试。本地地址会自动绕过代理,但有时错误配置仍会导致问题。

建议: 打开 菜单 → 翻译设置 → 本地大模型设置(或其他对应渠道设置面板),核对您填写的 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