#2096 RuntimeError: The model is overloaded. Please try again later.

219.71* Posted at: 6 hours ago 👁17

运行时错误:The model is overloaded. Please try again later.:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 932, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 132, in _item_task
RuntimeError: The model is overloaded. Please try again later.


=
system:Windows-10-10.0.26200-SP0
version:v3.89
frozen:True
language:zh
root_dir:E:/win-videotrans-v3.83

3 Replies

您遇到的错误 The model is overloaded. Please try again later. 表明您使用的 Gemini 翻译模型当前负载过高或请求频率过快,被服务器拒绝了。

请按以下步骤解决:

  1. 立即调整请求频率(首要操作)

    • 在软件主界面,点击右下角的 “设置更多参数”
    • 找到 “翻译后暂停秒” 选项,将其数值调大(例如从默认的 0 改为 35)。
    • 找到 “每批字幕行数” 选项,将其数值调小(例如从默认的 50 改为 1020)。
  2. 检查高级选项设置

    • 在菜单栏选择 工具 -> 选项 -> 高级选项
    • “字幕翻译调整” 区域,确认 “翻译后暂停秒” 已设置(如第1步所述)。
    • 勾选 “批量翻译时强制串行” 选项,这能确保翻译请求按顺序发送,避免并发过高。
  3. 更换翻译渠道(如果问题持续)

    • 如果调整后仍然报错,说明 Gemini 服务暂时不稳定或您的 API 配额可能有限。
    • 建议在主界面第3行的“翻译”设置中,暂时切换到其他翻译渠道,例如 Google(需配置代理)、DeepSeekChatGPT
  4. 检查网络代理

    • 如果您在国内使用 Gemini,请确保在主界面第5行的“网络代理”中已填写了正确且可用的代理地址(格式如 http://127.0.0.1:7860)。

完成上述调整后,请重新尝试翻译任务。如果问题依旧,请提供 E:/win-videotrans-v3.83/logs/ 目录下的最新日志文件以便进一步分析。

翻译字幕阶段出错:[Gemini AI] 无效的值或参数:Expecting property name enclosed in double quotes: line 1 column 2 (char 1):
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 184, in run
File "videotrans\task\_translate_srt.py", line 45, in trans
File "videotrans\translator\__init__.py", line 932, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 111, 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 775, in request_streamed
File "google\genai\_api_client.py", line 237, in segments
File "json\__init__.py", line 346, in loads
File "json\decoder.py", line 337, in decode
File "json\decoder.py", line 353, in raw_decode
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

TaskCfg(cache_folder=None, target_dir='C:/Users/USER/Videos/pyvideotrans/translate', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code='English', target_language_code='Traditional Chinese', source_sub='C:/Users/USER/Videos/pyvideotrans/recogn/Wifey - Serenity Cox Danielle Renae Sierra Spunk Anastasia Shades Country Hotwife - Wifey Reunion Hotwives Return For The Ultimate Orgy.srt', target_sub='C:/Users/USER/Videos/pyvideotrans/translate/Wifey - Serenity Cox Danielle Renae Sierra Spunk Anastasia Shades Country Hotwife - Wifey Reunion Hotwives Return For The Ultimate Orgy.Traditional Chinese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='Wifey - Serenity Cox Danielle Renae Sierra Spunk Anastasia Shades Country Hotwife - Wifey Reunion Hotwives Return For The Ultimate Orgy', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role=None, copysrt_rawvideo=False, clear_cache=False, translate_type=5, tts_type=None, recogn_type=None, model_name=None, split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='C:/Users/USER/Videos/pyvideotrans/recogn/Wifey - Serenity Cox Danielle Renae Sierra Spunk Anastasia Shades Country Hotwife - Wifey Reunion Hotwives Return For The Ultimate Orgy.srt', basename='Wifey - Serenity Cox Danielle Renae Sierra Spunk Anastasia Shades Country Hotwife - Wifey Reunion Hotwives Return For The Ultimate Orgy.srt', ext='srt', dirname='C:/Users/USER/Videos/pyvideotrans/recogn', shound_del_name=None, uuid='af3e006351', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)

错误 Expecting property name enclosed in double quotes 表明 Gemini API 返回了非法的 JSON 数据,这通常由以下原因导致:

1. 字幕文件内容问题 (首要排查点)
您的字幕文件路径包含非常长的文件名和特殊字符(如连字符、空格)。这可能导致字幕内容在发送给 API 时格式异常。

  • 解决方案:请将待翻译的 SRT 文件重命名为一个简短、仅包含英文字母和数字的名称(例如 test.srt),并将其移动到简单的路径下(如 D:/test.srt),然后重新尝试翻译。

2. API 密钥或配置问题

  • 检查 API 密钥:请确认在“翻译设置”中填写的 Gemini API 密钥正确无误,且未过期。
  • 检查模型名称:确保在“翻译设置”中选择的 Gemini 模型是可用且支持的(例如 gemini-1.5-pro)。

3. 调整请求参数
在“设置更多参数”或“高级选项”中:

  • “每批字幕行数” 调小(例如设为 5),减少单次请求的数据量。
  • “翻译后暂停秒” 调大(例如设为 3),降低请求频率。

4. 临时更换翻译渠道
如果上述步骤无效,建议暂时切换到其他翻译渠道(如 DeepSeek、ChatGPT 或 Google 翻译)以完成当前任务,这能排除是否是 Gemini 服务端的临时问题。

操作顺序建议:首先尝试 第1步(重命名文件),这是最高效的解决方法。如果问题依旧,再依次尝试 2、3、4 步。

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