#5406 requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tt

2408:8214* Posted at: 14 hours ago

连接被拒绝,请确保本地服务已启动并正在运行:
Traceback (most recent call last):
File "urllib3\connection.py", line 198, in _new_conn
File "urllib3\util\connection.py", line 85, in create_connection
File "urllib3\util\connection.py", line 73, in create_connection
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 493, in _make_request
File "urllib3\connection.py", line 494, in request
File "http\client.py", line 1278, in endheaders
File "http\client.py", line 1038, in _send_output
File "http\client.py", line 976, in send
File "urllib3\connection.py", line 325, in connect
File "urllib3\connection.py", line 213, in _new_conn
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
File "requests\adapters.py", line 644, in send
File "urllib3\connectionpool.py", line 841, in urlopen
File "urllib3\util\retry.py", line 519, in increment
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tts (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\ListenVoice.py", line 16, in run
File "videotrans\tts\__init__.py", line 184, in run
File "videotrans\tts\_base.py", line 134, in run
File "videotrans\tts\_base.py", line 215, in _item_task
File "videotrans\tts\_gptsovits.py", line 81, in _run
File "requests\api.py", line 115, in post
File "requests\api.py", line 59, in request
File "requests\sessions.py", line 589, in request
File "requests\sessions.py", line 703, in send
File "requests\adapters.py", line 677, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9880): Max retries exceeded with url: /tts (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))


=
system:Windows-10-10.0.28000-SP0
version:v4.01
frozen:True
language:zh
root_dir:D:/D盘/Softwear/win-pyvideotrans-v4.01-0602s

3 Replies

原因是 GPT-SoVITS 本地服务未启动或 API 地址配置错误。127.0.0.1:9880 是 GPT-SoVITS 的 API 默认端口,软件尝试连接时被拒绝。

解决方法:

  1. 启动 GPT-SoVITS 服务
    在 GPT-SoVITS 项目目录中,运行 api.pyapi_v2.py(根据你的部署情况选择),确保服务启动后在控制台看到类似 Uvicorn running on http://127.0.0.1:9880 的信息。
  2. 填写正确的 API 地址
    打开 pyVideoTrans → 菜单 → TTS 设置GPT-SoVITS 面板,将 API 地址设为 http://127.0.0.1:9880
    ⚠️ 注意:不要填写 WebUI 的 7860 端口,否则会出现类似 {"detail":"Not Found"} 的错误。
  3. 勾选匹配的 API 版本
    在软件中,如果启动的是 api.py,则在 GPT-SoVITS 设置中取消勾选 api_v2?;如果启动的是 api_v2.py,则勾选 api_v2?。务必保持一致。
  4. 检查其他本地服务
    如果你使用的是其他需要本地部署的 TTS 渠道(如 F5-TTS、CosyVoice 等),同样需要先启动对应的服务,并确保 API 地址和端口与设置一致。

请查阅相关文档:

错误啊,报错了

请提供具体的错误信息或日志文件内容,以便精准定位问题。你可以在软件安装目录下的 logs/ 文件夹中找到最新的 .log 文件,复制底部约30行的报错内容发给我。

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