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

2408**c8c6 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 AI 服务)在中国大陆无法直连,软件在请求 Google 服务器时被阻断,WinError 10060 就是这个典型表现。

解决方案:

  1. 确认已开启科学上网工具(VPN/代理客户端),并确认其本地代理端口号(如 Clash 常见为 7890、v2rayN 常见为 10808)。
  2. 在软件主界面填写代理地址:
    在主界面「同步对齐」行右侧(或「网络代理」文本框)填写代理地址,格式必须是:

    http://127.0.0.1:7890

    (端口号换成你实际使用的端口,不要填 0.0.0.0)

  3. 确认代理确实可用:先在浏览器里打开 https://gemini.google.com 或 https://www.google.com 测试能否访问,若浏览器都不行,说明代理本身有问题,需先修好代理。
  4. 检查 Gemini API Key 是否已正确填写:菜单 → 翻译设置 → Gemini,确认密钥有效、额度充足(但当前错误是连接超时,不是鉴权失败,所以主要问题还是网络)。
  5. 替代方案(推荐更省事):

    • 若不方便使用代理,可改用 DeepSeek 翻译渠道(国内直连、物美价廉、翻译质量优于 Gemini 免费额度),或使用 Google(免费)/Microsoft(免费) 传统翻译渠道(Google 同样需代理,微软无需代理)。
    • 若坚持用 Gemini,也可使用支持国内访问的 Gemini 中转 API(在「兼容AI/本地模型」渠道中填写中转地址)。

请查阅相关文档:

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