#1634 翻译字幕阶段出错:[Gemini AI] 网络连接失败:Traceback (most recent call last): File "httpx\_transports\default.py", line 101, in map_ht

165.154* Posted at: 16 hours ago 👁15

翻译字幕阶段出错:[Gemini AI] 网络连接失败:
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 "videotrans\task\job.py", line 184, in run
File "videotrans\task\trans_create.py", line 423, in trans
File "videotrans\translator\__init__.py", line 931, in run
File "videotrans\translator\_base.py", line 80, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 132, in _item_task
File "google\genai\models.py", line 5783, in generate_content_stream
File "google\genai\models.py", line 4666, in _generate_content_stream
File "google\genai\_api_client.py", line 774, in request_streamed
File "google\genai\_api_client.py", line 671, in _request
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.

TaskCfg(cache_folder='D:/videotrans/tmp17712/d1554b2c20', target_dir="E:/Iceberg President's Substitute Soldier King/_video_out/2", remove_noise=False, is_separate=False, detect_language='en', subtitle_language=None, source_language='英语', target_language='西班牙语', source_language_code='en', target_language_code='es', source_sub="E:/Iceberg President's Substitute Soldier King/_video_out/2/en.srt", target_sub="E:/Iceberg President's Substitute Soldier King/_video_out/2/es.srt", source_wav='D:/videotrans/tmp17712/d1554b2c20/en.wav', source_wav_output="E:/Iceberg President's Substitute Soldier King/_video_out/2/en.m4a", target_wav='D:/videotrans/tmp17712/d1554b2c20/target.wav', target_wav_output="E:/Iceberg President's Substitute Soldier King/_video_out/2/es.m4a", subtitles='', novoice_mp4='D:/videotrans/tmp17712/d1554b2c20/novoice.mp4', noextname='2', shibie_audio=None, targetdir_mp4="E:/Iceberg President's Substitute Soldier King/_video_out/2/2.mp4", instrument=None, vocal=None, back_audio='', background_music=None, app_mode='biaozhun', subtitle_type=2, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='clone', copysrt_rawvideo=False, clear_cache=True, translate_type=5, tts_type=20, recogn_type=6, model_name='large-v3', split_type=0, voice_autorate=True, video_autorate=True, cuda=True, name="E:/Iceberg President's Substitute Soldier King/2.mp4", basename='2.mp4', ext='mp4', dirname="E:/Iceberg President's Substitute Soldier King", shound_del_name=None, uuid='d1554b2c20', remove_silent_mid=False, align_sub_audio=True, enable_diariz=True, nums_diariz=0, auto_fix=True)


=
system:Windows-10-10.0.19045-SP0
version:v3.86
frozen:True
language:zh
root_dir:D:/videotrans

1 Replies

Gemini AI 翻译时出现网络连接失败,服务器无响应断开连接。这通常是由于网络不稳定、代理设置问题或 Gemini API 服务端临时故障导致。

请按以下步骤排查:

  1. 检查网络连接和代理

    • 确保网络连接稳定。如果使用了代理,请检查代理是否正常工作,并在软件主界面第5行的“网络代理”处正确填写代理地址(格式如 http://127.0.0.1:7860)。
    • 尝试暂时关闭代理,使用直连网络测试。
  2. 降低请求频率

    • 在菜单栏选择 工具/选项 -> 高级选项
    • 在“字幕翻译调整”区域,将“同时翻译字幕数”改为 1
    • 将“翻译后暂停秒”设置为 5 或更高。
  3. 重试任务

    • 返回主界面,确保勾选了“清理已生成”,然后重新开始翻译任务。
  4. 检查 API 密钥

    • 确认在“翻译设置”中为 Gemini 填写的 API Key 有效且未过期。

如果以上方法均无效,可能是 Gemini 服务端临时问题,请稍后再试或暂时更换其他翻译渠道(如 Google、DeepSeek 等)。

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

Trending Questions