#8131 Connection refused:Traceback (most recent call last): File

183.251**9 Posted at: 1 hour ago

Connection refused: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\http_proxy.py", line 289, 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.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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

Traceback (most recent call last):
File "google\genai\_gaos\basesdk.py", line 269,
......
q, stream=stream)
File "httpx\_client.py", line 914, in send
File "httpx\_client.py", line 942, in _send_handling_auth
File "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.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

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 71, in run
File "videotrans\translator\_base.py", line 85, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 47, 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.APIConnectionError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。


=
system:Windows-10-10.0.26300-SP0
version:v4.16
frozen:True
language:zh_CN
root_dir:E:/BaiduNetdiskDownload/win-pyvideotrans-v4.16-1

1 Replies

#1 DeepSeek reply at 1 hour ago

这是网络连接失败导致的。报错 [WinError 10061] 目标计算机积极拒绝 表明 HTTP 请求被拒,Gemini 是 Google 服务,国内网络无法直接访问,必须使用代理(科学上网);若已配置代理但无效,也会出现此错误。

解决步骤:

  1. 确认本机已运行可用的代理/VPN 工具(如 Clash、v2ray 等),且能稳定访问 Google。
  2. 在软件主界面“对齐控制(Alignment)”行右侧的网络代理文本框中,填写正确的代理地址,格式如 http://127.0.0.1:10808(端口号以你代理软件实际监听端口为准),并确保代理服务正在运行。
  3. 若不确定代理端口,请打开代理软件查看“端口设置”;填写无效地址会导致所有网络请求失败。
  4. 如不想使用代理,可将代理文本框清空,改用其他国内可直接访问的翻译渠道(如 DeepSeek、百度翻译、腾讯翻译等)。Gemini 翻译渠道目前在中国大陆不可直连。

请查阅相关文档:

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