#6533 Error during subtitle translation stage [Gemini AI] Translation returned empty output

2a01:**:9ab8 Posted at: 4 hours ago

Error during subtitle translation stage [Gemini AI] Translation returned empty output

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 137, in process_task

File "videotrans\task\_stage_translate.py", line 31, in trans

File "videotrans\translator\_runner.py", line 68, in run

File "videotrans\translator\_base.py", line 71, in run

File "videotrans\translator\_base.py", line 206, in _run_srt

videotrans.configure.excepts.TranslateSrtError: Translation returned empty output
cfg=[TaskCfgVTT]当前工作模式: 转录并翻译字幕
原始输入文件名: G:/DOWN02/A Will Eternal Season 4 Episode 1 [166] (4K)/A Will Eternal Season 4 Episode 1 [166] (4K).mp4,
输出结果保存到文件夹: G:/DONGWA TRADUCTION/MODIF/A Will Eternal Season 4 Episode 1 [166] (4K)-mp4,
临时文件夹: G:/PY TRANS VIDEO DERNIERE VERSION 4.09/tmp/63028/ff01b1c915
已选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:Qwen-ASR(Built-in), 1.7B, 发音语言: Simplified Chinese, 断句方式:默认断句
TranslateSrt:Gemini AI,原始语言:Simplified Chinese,目标语言:French, 已选 SendSRT
SubFormat: 单字幕


=
system:Windows-10-10.0.26200-SP0
version:v4.09
frozen:True
language:en
root_dir:G:/PY TRANS VIDEO DERNIERE VERSION 4.09

1 Replies

This error means the Gemini API returned no translated text at all. It is usually caused by an invalid/expired API key, no proxy or an unreachable Gemini endpoint, an incorrect model selection, or the “Send full subtitles” mode causing the model to return an empty response.

  1. Check your Gemini API configuration:

    • Go to Menu → Translation Settings → Gemini AI.
    • Verify the API Key is correct, has not expired, and has available quota.
  2. Verify the network connection:

    • Gemini is a foreign service. If you are in mainland China, you must configure a valid proxy in the main interface (Network proxy field), e.g. http://127.0.0.1:7890.
    • Clear any invalid proxy settings, otherwise all requests will fail.
  3. Change the subtitle sending mode:

    • Uncheck Send complete subtitle (i.e. turn off SendSRT). This forces line-by-line translation and often avoids empty responses caused by context length or prompt issues.
    • If you keep it enabled, reduce the AI translation batch subtitle line count in Menu → Tools/Options → Advanced Options → Subtitle Translation Adjustment.
  4. Confirm the model:

    • Select a proper Gemini text model from the dropdown (e.g. gemini-2.5-flash). Do not manually enter a non-text model.
    • Make sure you did not accidentally choose a speech recognition or ASR model.
  5. Try another translation channel to isolate the problem:

    • Switch to DeepSeek or OpenAI temporarily. If they work, the issue is specific to your Gemini configuration.
  6. If the problem continues, check the latest log file in logs/ folder and look for preceding errors such as 401, 403, 429, or token length exceeded. Provide the last 30 lines of the log (and your exact version number, if not already shown) for further diagnosis.

Please refer to the related documentation:

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource