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

240e:3a1* Posted at: 2 hours ago 👁5

连接被拒绝,请确保本地服务已启动并正在运行:
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 347, in run
File "videotrans\tts\_base.py", line 180, in run
File "videotrans\tts\_base.py", line 209, in _local_mul_thread
File "videotrans\tts\_gptsovits.py", line 97, in _item_task
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.19045-SP0
version:v3.98
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.98

1 Replies

这是由于 GPT-SoVITS 本地 TTS 服务未启动或 API 地址配置错误导致的。软件尝试连接 http://127.0.0.1:9880 但被目标计算机拒绝。

解决方案:

  1. 确保 GPT-SoVITS 服务已启动:你需要先独立运行 GPT-SoVITS 项目,并启动其 API 服务。请确保其服务终端窗口未关闭,且正在监听 127.0.0.1:9880 端口。
  2. 检查 API 地址配置:在 pyVideoTrans 中,进入 菜单 -> 翻译设置 -> GPT-SoVITS 设置面板。确认其中的 API地址 与你的 GPT-SoVITS 服务地址完全一致(默认通常是 http://127.0.0.1:9880)。
  3. 验证服务连通性:在浏览器中访问 http://127.0.0.1:9880/docshttp://127.0.0.1:9880,查看是否能打开 GPT-SoVITS 的 API 文档或页面。如果无法打开,说明服务未成功启动。
  4. 检查端口占用:确认端口 9880 未被其他程序占用。如果被占用,你需要在 GPT-SoVITS 的启动命令中修改端口号,并在 pyVideoTrans 的设置中同步修改。

请查阅相关文档:

Post Your Reply