#1591 TaskCfg(cache_folder=None, target_dir='D:/Setup/pyvideotrans/output/translate', remove_noise=False, is_separate=False, d

171.242* Posted at: 5 hours ago 👁8

Trans Error:[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 77, 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 928, in run
File "videotrans\translator\_base.py", line 80, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_gemini.py", line 123, 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='D:/Setup/pyvideotrans/output/translate', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code='Simplified Chinese', target_language_code='Vietnamese', source_sub='D:/Downloads/subtitle_output.srt', target_sub='D:/Setup/pyvideotrans/output/translate/subtitle_output.Vietnamese.srt', source_wav=None, source_wav_output=None, target_wav=None, target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='subtitle_output', 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='D:/Downloads/subtitle_output.srt', basename='subtitle_output.srt', ext='srt', dirname='D:/Downloads', shound_del_name=None, uuid='fabdb63f02', remove_silent_mid=False, align_sub_audio=True, enable_diariz=False, nums_diariz=0)


=
system:Windows-10-10.0.26200-SP0
version:v3.85
frozen:True
language:en
root_dir:D:/Setup/pyvideotrans

1 Replies

This error indicates a compatibility issue with the Gemini AI translation API, specifically related to an unsupported thinking_level parameter being passed. This is likely due to a recent API update from Google that changed the available parameters.

Immediate Solution:

  1. Update your software: This issue was fixed in a recent version. Go to the official website and download the latest version of pyVideoTrans.
  2. If updating is not possible: Temporarily switch to a different translation service (e.g., Google, DeepSeek, or OpenAI) in the "Translate" settings until you can update the software.

The error occurs because the software is sending a thinking_level='HIGH' parameter that the Gemini API no longer accepts. The latest version of pyVideoTrans has been adjusted to comply with the updated API specifications.

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