#977 aiohttp.client_exceptions.ClientProxyConnectionError: Cannot connect to host 127.0.0.1:10808 ssl:<ssl.SSLContext object

111.8* Posted at: 1 day ago 👁12

系统错误 (10061):Connect call failed ('127.0.0.1', 10808):

Traceback (most recent call last):

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

RuntimeError: no running event loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "aiohttp\connector.py", line 1248, in _wrap_create_connection

File "aiohappyeyeballs\impl.py", line 122, in start_connection

File "aiohappyeyeballs\impl.py", line 73, in start_connection

File "aiohappyeyeballs\impl.py", line 208, in _connect_sock

File "asyncio\selector_events.py", line 499, in sock_connect

File "asyncio\selector_events.py", line 534, in _sock_connect_cb

ConnectionRefusedError: [Errno 10061] Connect call failed ('127.0.0.1', 10808)

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

Traceback (most recent call last):

File "videotrans\util\ListenVoice.py", line 18, in run

File "videotrans\tts\__init__.py", line 248, in run

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

File "videotrans\tts\_edgetts.py", line 70, in _create_audio_with_retry

File "asyncio\tasks.py", line 445, in wait_for

File "edge_tts\communicate.py", line 590, in save

File "edge_tts\communicate.py", line 566, in stream

File "edge_tts\communicate.py", line 431, in __stream

File "aiohttp\client.py", line 1482, in __aenter__

File "aiohttp\client.py", line 1061, in _ws_connect

File "aiohttp\client.py", line 770, in _request

File "aiohttp\client.py", line 725, in _connect_and_send_request

File "aiohttp\connector.py", line 622, in connect

File "aiohttp\connector.py", line 1187, in _create_connection

File "aiohttp\connector.py", line 1586, in _create_proxy_connection

File "aiohttp\connector.py", line 1561, in _create_direct_connection

File "aiohttp\connector.py", line 1530, in _create_direct_connection

File "aiohttp\connector.py", line 1271, in _wrap_create_connection

aiohttp.client_exceptions.ClientProxyConnectionError: Cannot connect to host 127.0.0.1:10808 ssl: [Connect call failed ('127.0.0.1', 10808)]

=====

Windows-10-10.0.19045-SP0

version:v3.81

frozen:True

language:zh

1 Replies

本条内容由 gpt-5-mini 回复
问题很可能由软件配置了本地代理 (127.0.0.1:10808) 但对应的代理服务未启动(导致 ConnectionRefused),同时 Edge-TTS 在异步环境中运行时触发了“no running event loop”的次生错误。请按下面步骤排查和修复:

1. 先确认本地代理是否需要且正在运行

  • 如果你使用 Clash/V2Ray/Proxifier 等本地代理,确保它已启动并监听 127.0.0.1:10808。可以在命令行运行:
  • netstat -ano | findstr 10808
  • (或用浏览器/其它客户端通过该代理访问网页作测试)
  • 如果没有代理程序在运行,就会出现你看到的 ConnectionRefused 错误。

2. 如果不需要代理或暂时排除网络代理问题:禁用或清除软件内的代理设置

  • 打开软件对应设置界面(TTS/翻译/语音识别 等菜单里可配置网络/代理的项),将代理地址与端口清空或禁用代理功能后重启软件。
  • 若界面不易定位,可直接编辑配置文件:videotrans/params.json,查找可能的 proxy / http_proxy / https_proxy / socks5 字段并清空或移除,保存后重启 sp.exe。

3. 针对 Edge-TTS 的并发/异步问题(避免触发 no running event loop 或服务端限流):

  • 菜单 -> 工具/选项 -> 高级选项 -> 配音调整:将“同时配音字幕数”改为 1;将“配音后暂停时间/秒”设为 5 或更高。
  • 保存并重启后再次尝试配音任务。

4. 重启软件并复现问题,观察是否仍报错。

  • 若问题解决:说明是代理服务未运行或并发导致。
  • 若仍然报错或出现新的“no running event loop”异常:请提供位于 videotrans/logs/ 目录下的最新日志文件(按日期命名的 .log),以便进一步分析。

如果你愿意,请附上以下信息以便我做更精确的诊断:当前是否使用本地代理软件(名称)、你在 params.json 中有关 proxy 的条目(可截取相关几行)、以及 logs 目录下当天的日志文件内容。

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

Trending Questions