#3742 TaskCfg(cache_folder='/Volumes/SSD/AI/pyvideotrans/tmp/93217/6440c65f29', target_dir='/Users/renxu/Downloads/JUQ-809/_vi

13.212* Posted at: 2 hours ago 👁8

翻译字幕阶段出错 [Gemini AI] 无效的值或参数:1 validation error for ThinkingConfig
thinking_level
Extra inputs are not permitted [type=extra_forbidden, input_value='high', input_type=str]

For further information visit https://errors.pydantic.dev/2.10/v/extra_forbidden

Traceback (most recent call last):
File "/Volumes/SSD/AI/pyvideotrans/videotrans/translator/_base.py", line 78, in run

return self._run_srt(split_source_text)

File "/Volumes/SSD/AI/pyvideotrans/videotrans/translator/_base.py", line 137, in _run_srt

result = self._item_task(srt_str)

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 338, in wrapped_f

return copy(f, *args, **kw)

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 477, in call

do = self.iter(retry_state=retry_state)

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 378, in iter

result = action(retry_state)

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 421, in exc_check

raise retry_exc from fut.exception()

tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Volumes/SSD/AI/pyvideotrans/videotrans/task/job.py", line 184, in run

trk.trans()

File "/Volumes/SSD/AI/pyvideotrans/videotrans/task/trans_create.py", line 461, in trans

target_srt = run_trans(

File "/Volumes/SSD/AI/pyvideotrans/videotrans/translator/__init__.py", line 933, in run

return Gemini(**kwargs).run()

File "/Volumes/SSD/AI/pyvideotrans/videotrans/translator/_base.py", line 81, in run

raise e.last_attempt.exception()

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/tenacity/__init__.py", line 480, in call

result = fn(*args, **kwargs)

File "/Volumes/SSD/AI/pyvideotrans/videotrans/translator/_gemini.py", line 77, in _item_task

think_cfg=types.ThinkingConfig(

File "/Volumes/SSD/AI/pyvideotrans/.venv/lib/python3.10/site-packages/pydantic/main.py", line 214, in init

validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)

pydantic_core._pydantic_core.ValidationError: 1 validation error for ThinkingConfig
thinking_level
Extra inputs are not permitted [type=extra_forbidden, input_value='high', input_type=str]

For further information visit https://errors.pydantic.dev/2.10/v/extra_forbidden

TaskCfg(cache_folder='/Volumes/SSD/AI/pyvideotrans/tmp/93217/6440c65f29', target_dir='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4', remove_noise=False, is_separate=False, detect_language='ja', subtitle_language=None, source_language='日语', target_language='简体中文', source_language_code='ja', target_language_code='zh-cn', source_sub='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4/ja.srt', target_sub='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4/zh-cn.srt', source_wav='/Volumes/SSD/AI/pyvideotrans/tmp/93217/6440c65f29/ja.wav', source_wav_output='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4/ja.m4a', target_wav='/Volumes/SSD/AI/pyvideotrans/tmp/93217/6440c65f29/target.wav', target_wav_output='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4/zh-cn.m4a', subtitles='', novoice_mp4='/Volumes/SSD/AI/pyvideotrans/tmp/93217/6440c65f29/novoice.mp4', noextname='JUQ-809', shibie_audio=None, targetdir_mp4='/Users/renxu/Downloads/JUQ-809/_video_out/JUQ-809-mp4/JUQ-809.mp4', instrument=None, vocal=None, back_audio='', background_music=None, app_mode='tiqu', subtitle_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', copysrt_rawvideo=False, clear_cache=False, translate_type=5, tts_type=10, recogn_type=0, model_name='large-v3', split_type=0, voice_autorate=False, video_autorate=False, cuda=False, name='/Users/renxu/Downloads/JUQ-809/JUQ-809.mp4', basename='JUQ-809.mp4', ext='mp4', dirname='/Users/renxu/Downloads/JUQ-809', shound_del_name=None, uuid='6440c65f29', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=5, rephrase=0, only_out_mp4=False)


=
system:macOS-26.3.1-arm64-arm-64bit
version:v3.91
frozen:False
language:zh
root_dir:/Volumes/SSD/AI/pyvideotrans
Python: 3.10.19 (main, Dec 17 2025, 20:54:19) [Clang 21.1.4 ]

1 Replies

这是由于 Gemini AI 翻译渠道的 API 调用参数与当前版本的 Gemini SDK 不兼容导致的。具体错误是尝试传递了无效的 thinking_level 参数。

解决方案:

  1. 检查并更新 pyVideoTrans 到最新版本。你当前使用的是 v3.91,最新版本是 v3.98,此问题可能已在后续版本中修复。
  2. 如果更新后问题依旧,请尝试在软件中临时更换为其他翻译渠道(如 DeepSeek、OpenAI ChatGPT 等)来完成当前任务。
  3. 作为临时规避方案,你也可以尝试在 菜单 -> 翻译设置 -> Gemini AI 设置面板中,检查或清空“模型”字段,让其使用默认值,或者尝试更换为其他可用的 Gemini 模型(如 gemini-1.5-pro)。

请查阅相关文档:

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