#1657 requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9988): Max retries exceeded with url: /ap

2409:8a55* Posted at: 8 days ago 👁40

连接被拒绝,请确保本地服务已启动并正在运行:
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 1277, in endheaders
File "http\client.py", line 1037, in _send_output
File "http\client.py", line 975, 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=9988): Max retries exceeded with url: /apitts (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 18, in run
File "videotrans\tts\__init__.py", line 295, in run
File "videotrans\tts\_base.py", line 177, in run
File "videotrans\tts\_clone.py", line 85, in _item_task
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 439, in result
File "concurrent\futures\_base.py", line 391, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\tts\_clone.py", line 59, in _run
File "requests\api.py", line 115, in post

return request("post", url, data=data, json=json, **kwargs)

File "requests\api.py", line 59, in request

return session.request(method=method, url=url, **kwargs)

File "requests\sessions.py", line 589, in request

resp = self.send(prep, **send_kwargs)

File "requests\sessions.py", line 703, in send

r = adapter.send(request, **kwargs)

File "requests\adapters.py", line 677, in send
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9988): Max retries exceeded with url: /apitts (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))


=
system:Windows-10-10.0.22631-SP0
version:v3.86
frozen:True
language:zh
root_dir:E:/pyvideotrans

1 Replies

这个错误表明软件无法连接到本地端口 9988 的服务。您正在使用语音克隆功能(GPT-SoVITS、F5-TTS 或 CosyVoice),但对应的本地服务没有启动。

解决方案:

  1. 检查语音克隆服务状态

    • 如果您使用的是 GPT-SoVITS、F5-TTS 或 CosyVoice,需要先启动对应的本地服务
    • 确保服务在 127.0.0.1:9988 端口正常运行
  2. 启动语音克隆服务

    • 按照相应语音克隆项目的说明文档启动服务
    • 确认服务启动成功并能正常访问 http://127.0.0.1:9988
  3. 临时解决方案

    • 如果暂时无法启动语音克隆服务,可以切换到其他配音渠道:

      • Edge-TTS(免费,无需本地服务)
      • Azure TTS(需要 API Key)
      • OpenAI TTS(需要 API Key)
  4. 检查防火墙设置

    • 确保防火墙没有阻止本地端口 9988 的连接

服务启动后,重新在 pyVideoTrans 中选择对应的语音克隆角色即可正常使用。

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.

Donate: https://ko-fi.com/jianchang512

Similar issues already exist

Trending Questions