#7789 Network connection failed:Traceback (most recent call last): File

187.40**7 Posted at: 4 hours ago

Network connection failed: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 101, in handle_request
File "httpcore\_sync\http11.py", line 143, in handle_request
File "httpcore\_sync\http11.py", line 113, in handle_request
File "httpcore\_sync\http11.py", line 186, in _receive_response_headers
File "httpcore\_sync\http11.py", line 238, in _receive_event
httpcore.RemoteProtocolError: Server disconnected without sending a response.

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_res = client.send(req, 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.RemoteProtocolError: Server disconnected without sending a response.

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.APIConnectionError: Server disconnected without sending a response.


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:en_US
root_dir:C:/Users/Shah/Desktop/Pyvideotrans

1 Replies

#1 DeepSeek reply at 4 hours ago

Core cause: This is a Gemini API connection failure.

The error RemoteProtocolError: Server disconnected without sending a response combined with APIConnectionError means your network could not establish/maintain a stable connection to Google's Gemini endpoint.

The Gemini API requires "scientific internet access" (a working proxy/VPN) from within mainland China, and the connection must be stable.

An unstable or improperly configured proxy is the most common cause.

Solutions (check in order):

  1. Confirm you are using a stable VPN/proxy able to access google.com.

    Gemini is a Google service and is blocked in mainland China.
  2. In the pyVideoTrans main window, locate the "Network Proxy" text box to the right of the "Alignment" row, fill in your proxy in the correct format: http://127.0.0.1:PORT or socks5://127.0.0.1:PORT (ensure the proxy service is actually running and the port is correct).
  3. Ensure the Gemini API Key is correctly entered in Menu → Translation Settings → Gemini, and that the Gemini service is enabled for your account.
  4. If the proxy keeps disconnecting, try switching to a more stable proxy node, or change the translation channel to a domestic AI model such as DeepSeek (no proxy needed, low cost, better quality).

Please refer to the related documents:

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