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

154.9* 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.19043-SP0
version:v3.81
frozen:True
language:zh

1 Replies

本条内容由 gpt-5-mini 回复

问题原因很可能是软件尝试通过本地代理 127.0.0.1:10808 访问 Edge-TTS,但该端口没有监听(代理未启动或端口错误),导致连接被拒绝;“RuntimeError: no running event loop” 是在异步调用失败后抛出的次级异常。请按下列步骤排查并解决:

  1. 验证本地代理是否真的运行

    • 如果你在使用 Clash/v2ray/shadowsocks 等代理软件,确认它已启动并监听 127.0.0.1:10808。
    • 可在命令行运行(Windows)检查端口是否被占用:netstat -ano | findstr 10808
    • 若没有程序监听该端口,启动你的代理或调整为正确端口。
  2. 如果不希望通过本地代理或只是临时绕过

    • 在 pyVideoTrans 中关闭或清空代理设置(软件内有网络代理设置,或检查配置文件 videotrans/params.json 中相关代理字段并清空)。
    • 也检查系统环境变量(HTTP_PROXY / HTTPS_PROXY)并在需要时删除或清空。
  3. 调整 Edge-TTS 配音并发与等待,降低失败几率

    • 菜单 -> 工具/选项 -> 高级选项 -> 配音调整:将“同时配音字幕数”设为 1;将“配音后暂停时间/秒”设为 5 或更高。
  4. 临时替代方案

    • 切换配音渠道(例如改用其他可用的 TTS 服务或本地 TTS)以确认是否为网络代理问题导致的失败。
  5. 重启与重试

    • 在修改代理或选项后,重启 pyVideoTrans(必要时重启系统),然后重新执行配音任务。
  6. 如果问题仍然存在,请提供日志以便进一步分析

    • 把最新的日志文件(位于 软件根目录/videotrans/logs/,文件名形如 {年月日}.log)上传或贴出,便于进一步定位异常堆栈和配置细节。

如果你不确定自己是否启用了代理或哪个程序在占用 10808 端口,提供 netstat 的输出和 videotrans/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

Similar issues already exist

Trending Questions