#8605 Connection timeout, please check network stability:Traceback (most recent call last): File

2408**fc17 Posted at: 1 hour ago

Connection timeout, please check network stability:Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 250, in handle_request
File "httpcore\_sync\connection_pool.py", line 216, in handle_request
File "httpcore\_sync\connection_pool.py", line 196, in handle_request
File "httpcore\_sync\connection.py", line 99, in handle_request
File "httpcore\_sync\connection.py", line 76, in handle_request
File "httpcore\_sync\connection.py", line 122, in _connect
File "httpcore\_backends\sync.py", line 205, in connect_tcp
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectTimeout: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

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

Traceback (most recent call last):
File "google\genai\_gaos\basesdk.py", line 269, in do

http

......
"httpx\_client.py", line 979, in _send_handling_redirects
File "httpx\_client.py", line 1014, in _send_single_request
File "httpx\_transports\default.py", line 249, in handle_request
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ConnectTimeout: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

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

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 75, in run
File "videotrans\translator\_base.py", line 75, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 50, in _item_task
File "google\genai\_gaos\google_genai.py", line 278, in create

response = wrap_sdk_call(

File "google\genai\_gaos\lib\compat_errors.py", line 368, in wrap_sdk_call

return fn(*args, **kwargs)

File "google\genai\_gaos\interactions.py", line 714, in create

http_res = self.do_request(

File "google\genai\_gaos\basesdk.py", line 291, in do_request

http_res = utils.retry(do, utils.Retries(retry_config[0], retry_config[1]))

File "google\genai\_gaos\utils\retries.py", line 264, in retry

return retry_with_attempt_count_backoff(

File "google\genai\_gaos\utils\retries.py", line 399, in retry_with_attempt_count_backoff

raise exception.inner

File "google\genai\_gaos\utils\retries.py", line 231, in do_request

res = func(attempt)

File "google\genai\_gaos\basesdk.py", line 274, in do

raise e

google.genai._gaos.lib.compat_errors.APITimeoutError: Request timed out. This is a client-side timeout. You can increase the timeout by setting the timeout argument on your request or in the client http options.


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:D:/Program Files (x86)/pyvideotrans4.14

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:这不是软件缺陷,而是网络连接被阻断——您使用的是 Gemini(Google)翻译渠道,其服务器在中国大陆无法直连,客户端在等待响应时超时(WinError 10060)。同时您也没有配置有效的网络代理。

解决方案(任选其一)

  1. 配置代理(继续用 Gemini)

    • 在软件主界面下方「网络代理」输入框中填写您的代理地址,格式必须为 http://127.0.0.1:7890(端口按您实际代理软件为准,如 Clash 常用 7890、v2rayN 常用 10809)。
    • 确认代理软件已启动且为「系统代理 / 全局」模式,先在浏览器打开 google.com 验证能访问,再回软件重试。
  2. 改用无需代理的翻译渠道(推荐,最省事)

    • 将「翻译渠道」由 Gemini 换成 Microsoft(免费)、DeepSeek、智谱AI、阿里 等国内可直连渠道。
    • 若换成 AI 渠道(DeepSeek/智谱),需先在 菜单-工具/选项-高级选项 对应渠道中填入 API Key。
  3. 降低请求压力,避免再次超时

    • 菜单-工具/选项-高级选项-字幕翻译 中,把 AI翻译渠道每批字幕行数 调小(如 20),并适当增大 翻译后暂停秒。
    • 高级选项-通用设置 中的 失败后重试次数 可设为 2~3。
  4. 附带建议(避免其他报错)

    • 您的安装路径为 D:/Program Files (x86)/pyvideotrans4.14,包含空格和系统受保护目录,容易导致临时文件写入失败。建议解压到 D:/pyvideotrans 这类简短纯英文路径后再运行。

若配置代理后仍报同样的超时,请提供 logs/ 文件夹下最新日志底部约 30 行内容以便进一步分析。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource