#840 requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5066): Max retries exceeded with url: /v1

203.168* Posted at: 26 days ago 👁52

连接被拒绝,请确保本地服务已启动并正在运行:

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 667, 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=5066): Max retries exceeded with url: /v1/audio/speech (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 263, in run

File "videotrans\tts\_base.py", line 182, in run

File "videotrans\tts\_kokoro.py", line 54, 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\_kokoro.py", line 47, 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 700, in send

requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=5066): Max retries exceeded with url: /v1/audio/speech (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))

=====

Windows-10-10.0.26100-SP0

version:v3.81

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于 pyVideoTrans 在尝试连接本地语音合成服务 Kokoro-TTS 时失败导致的。错误显示软件无法连接到 127.0.0.1:5066,表明 Kokoro-TTS 服务没有成功启动或正在运行。

问题原因:

您选择了 Kokoro-TTS 作为配音渠道,但该服务没有在本地启动,或者启动的端口不是 5066。

解决方案:

1. 启动 Kokoro-TTS 服务

  • 按照 Kokoro-TTS 的官方文档,在本地部署并启动该服务。
  • 确保服务启动后监听的地址是 127.0.0.1,端口是 5066(或者您配置的其他端口)。

2. 在软件中配置正确的服务地址

  • 打开 pyVideoTrans
  • 进入 菜单TTS设置语音合成设置
  • 找到 Kokoro-TTS 的设置项,确保 API地址 字段填写的是您本地服务实际运行的地址和端口(例如:http://127.0.0.1:5066)。

3. 验证服务是否可用

  • 启动 Kokoro-TTS 服务后,您可以尝试在浏览器中访问 http://127.0.0.1:5066(或您配置的地址),看是否有响应,以确认服务已正常启动。

4. 更换其他配音渠道(临时解决方案)

  • 如果您暂时无法解决 Kokoro-TTS 的部署问题,可以切换到其他可用的配音渠道,例如 edge-TTS(免费,但可能有限流)或其他您已配置好的 TTS 服务。

完成以上步骤后,重新尝试视频翻译或配音任务即可。

如需更多帮助,请参考官方文档:https://pyvideotrans.com

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