#5451 连接被重置,网络可能不稳定:Traceback (most recent call last): File "urllib3\connectionpool.py", line 787, in urlopen File "urllib3\

188.253* Posted at: 10 hours ago

连接被重置,网络可能不稳定:
Traceback (most recent call last):
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 534, in _make_request
File "urllib3\connection.py", line 565, in getresponse
File "http\client.py", line 1375, in getresponse
File "http\client.py", line 318, in begin
File "http\client.py", line 279, in _read_status
File "socket.py", line 717, in readinto
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。

During handling of the above exception, another exception occurred:

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 474, in increment
File "urllib3\util\util.py", line 38, in reraise
File "urllib3\connectionpool.py", line 787, in urlopen
File "urllib3\connectionpool.py", line 534, in _make_request
File "urllib3\connection.py", line 565, in getresponse
File "http\client.py", line 1375, in getresponse
File "http\client.py", line 318, in begin
File "http\client.py", line 279, in _read_status
File "socket.py", line 717, in readinto
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

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 659, in send
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

1 Replies

这是由于 GPT-SoVITS 本地 API 服务连接被强制关闭导致的。常见原因有以下三点:

  1. API 版本不匹配:您启动了 api.py 但软件中勾选了“api_v2?”(或反之),或者启动了网页版(7860端口)而非 API 版(9880端口)。
  2. 服务未启动或端口错误:GPT-SoVITS 服务未运行,或软件中填写的 API 地址不是 http://127.0.0.1:9880
  3. 防火墙/代理干扰:Windows 防火墙阻止了本地连接,或代理软件(如 VPN)拦截了 127.0.0.1 流量。

解决方案

  1. 确认服务状态与版本

    • 打开浏览器访问 http://127.0.0.1:9880/docs,若看到 Swagger 文档说明 API 已启动;若无法访问说明服务未启动或端口错误。
    • 若启动了 api.py 请使用“api_v1”模式(在菜单-TTS 设置-GPT-SoVITS 中取消勾选“api_v2?”);若启动了 api_v2.py 则需勾选“api_v2?”。
  2. 检查填写地址

    • 请确认软件中填写的 API 地址为 http://127.0.0.1:9880(不要填 0.0.0.0 或网页版 7860 端口)。
  3. 临时关闭防火墙或代理

    • 关停系统代理、VPN、科学上网工具,清空软件主界面“网络代理”文本框后重试。

请查阅相关文档:

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