#2188 TaskCfg(cache_folder=None, target_dir='C:/Users/Gopan/Videos/ICT Mastery - FULL COURSE/Srt', remove_noise=False, is_sepa

77.93* Posted at: 12 hours ago 👁10

翻译字幕阶段出错:[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 "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 77, in _item_task
File "pydantic\main.py", line 214, in init
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=None, target_dir='C:/Users/Gopan/Videos/ICT Mastery - FULL COURSE/Srt', 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='Simplified Chinese', source_sub='C:/Users/Gopan/Videos/ICT Mastery - FULL COURSE/Srt/001 - Market Structure 1.srt', target_sub='C:/Users/Gopan/Videos/ICT Mastery - FULL COURSE/Srt/001 - Market Structure 1.Simplified Chinese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='001 - Market Structure 1', 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/Gopan/Videos/ICT Mastery - FULL COURSE/Srt/001 - Market Structure 1.srt', basename='001 - Market Structure 1.srt', ext='srt', dirname='C:/Users/Gopan/Videos/ICT Mastery - FULL COURSE/Srt', shound_del_name=None, uuid='eb299ae72e', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.26200-SP0
version:v3.90
frozen:True
language:zh
root_dir:C:/win-pyvideotrans-3.90

1 Replies

这个错误表明 Gemini AI 翻译渠道的配置参数 thinking_level 在当前版本中不被支持。根据错误信息,您使用的是 pyVideoTrans v3.90,而 Gemini 的 API 或库可能已更新,导致软件内置的调用方式与新版本不兼容。

解决方案:

  1. 临时解决方案(推荐): 在软件中,暂时不要使用 Gemini AI 作为翻译渠道。请切换到其他翻译渠道,例如:

    • DeepSeek (免费,效果好)
    • Google 翻译 (需网络代理)
    • ChatGPT (OpenAI)
    • Claude
    • 或任何其他您已配置好的翻译渠道。
  2. 根本解决(等待更新): 此问题需要开发者更新软件以适配 Gemini 最新的 API 或 SDK。您可以:

    • 关注软件的官方更新日志 (https://pyvideotrans.com),等待新版本发布。
    • 如果您使用的是预打包版,当新版发布后,直接下载新版替换即可。

操作步骤:

  1. 在主界面或字幕翻译工具的 翻译设置 中,将“翻译渠道”从 Gemini AI 更改为其他选项。
  2. 重新执行翻译任务。

如果切换渠道后问题依旧,或者您必须使用 Gemini,请提供完整的日志文件(位于软件根目录下的 logs 文件夹内),以便进行更深入的分析。

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

Similar issues already exist

Trending Questions