#3731 TaskCfgVTT(is_cuda=True, uuid='d7f3054085', cache_folder='D:/pyvideotrans/tmp/8200/d7f3054085', target_dir='D:/Program F

103.108* Posted at: 2 hours ago 👁5

翻译字幕阶段出错 [Gemini AI] Gemini result is emtpy
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 102, in run
File "videotrans\translator\_base.py", line 123, in _run_text
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 173, in run
File "videotrans\task\trans_create.py", line 652, in trans
File "videotrans\translator\__init__.py", line 990, in run
File "videotrans\translator\_base.py", line 104, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 120, in _item_task
RuntimeError: Gemini result is emtpy
TaskCfgVTT(is_cuda=True, uuid='d7f3054085', cache_folder='D:/pyvideotrans/tmp/8200/d7f3054085', target_dir='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4', source_language='英语', source_language_code='en', source_sub='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4/en.srt', source_wav='D:/pyvideotrans/tmp/8200/d7f3054085/en.wav', source_wav_output='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4/en.m4a', target_language='繁体中文', target_language_code='zh-tw', target_sub='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4/zh-tw.srt', target_wav='D:/pyvideotrans/tmp/8200/d7f3054085/target.wav', target_wav_output='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4/zh-tw.m4a', name='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/How to release your pec minor with a Trigger Point ball.mp4', noextname='How to release your pec minor with a Trigger Point ball', basename='How to release your pec minor with a Trigger Point ball.mp4', ext='mp4', dirname='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release', shound_del_name=None, translate_type=5, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='YunJhe(Male/TW)', voice_autorate=False, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, detect_language='en', recogn_type=0, model_name='medium', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=0, fix_punc=False, subtitle_language=None, app_mode='biaozhun', subtitles='', targetdir_mp4='D:/Program Files/Desktop/治療2/01-1 Pectoralis Minor Ball Release Wall 或 Pec Minor Trigger Point Release/_video_out/How to release your pec minor with a Trigger Point ball-mp4/How to release your pec minor with a Trigger Point ball.mp4', novoice_mp4='D:/pyvideotrans/tmp/8200/d7f3054085/novoice.mp4', is_separate=False, instrument=None, vocal=None, back_audio='', clear_cache=True, background_music=None, subtitle_type=1, only_out_mp4=True, recogn2pass=True, output_srt=0, copysrt_rawvideo=False)


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

1 Replies

这是由于 Gemini AI 翻译渠道返回了空结果导致的。通常是因为网络问题、API密钥无效、请求内容触发安全策略,或 Gemini 服务本身暂时不可用。

解决方案:

  1. 检查网络代理:Gemini 服务在国内无法直接访问。请确保已在软件主界面的“网络代理地址”中填写了正确的代理地址(例如 http://127.0.0.1:10808)。
  2. 验证 API 密钥:前往 菜单 -> 翻译设置 -> Gemini AI,确认 API 密钥(API Key)填写正确且有效。
  3. 调整翻译参数:前往 菜单 -> 工具 -> 高级选项 -> 字幕翻译调整,尝试进行以下修改:

    • AI翻译渠道每批字幕行数 调小(例如从 20 改为 5)。
    • 翻译后暂停秒 调大(例如从 0 改为 3-5 秒),以降低请求频率。
    • 暂时取消勾选 发送完整字幕AI翻译附带完整原字幕 选项,以减少单次请求的数据量。
  4. 更换翻译渠道:如果以上步骤无效,可以暂时切换到其他可用的翻译渠道,例如 DeepSeek、OpenAI 或 Google 翻译(需代理)。
  5. 检查文件路径:从日志中看到你的视频文件路径包含中文和空格(如 D:/Program Files/Desktop/治療2/...)。虽然此错误直接原因是翻译渠道,但为排除干扰,建议将视频文件移动到纯英文、无空格、路径较短的目录下(如 D:/videos/)并重命名为简短英文名,然后重新尝试。

请查阅相关文档:

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.

Related resource