#8849 Error during subtitle translation stage [Google Translate (Free)] Expecting value: line 1 column 1 (char 0)Traceback (mo

2407**d0ff Posted at: 24 minutes ago

Error during subtitle translation stage [Google Translate (Free)] Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "videotrans\translator\_base.py", line 79, in run
File "videotrans\translator\_base.py", line 117, 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\only_one.py", line 114, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 85, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_microsoft.py", line 52, in _item_task
File "requests\models.py", line 980, in json
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

trk=Translation V/A 单视频模式
Select Media File: E:/New folder (6)/Daisy’s Five Shadow Roommates/1.mp4,
Output Directory: E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4,
self.cfg.cache_folder='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84'
Selected Clear Output, Not-Selected Enable accelerator
STT Service:faster-whisper(Built-in), large-v3-turbo, Spoken: Simplified Chinese
Max Speech Duration (s): 5s
Min Speech Duration (ms): 3000ms
Min Silence Duration for Split (ms): 600ms
VAD Speech Threshold: 0.45
VAD Engine: silero
Compute Type:default
Beam Size:5
Best Of:5
Condition on Previous Text:False
Repetition Penalty:1.0
Compression Ratio Threshold:2.4
TranslateSrt:Google Translate (Free),Spoken:Simplified Chinese,Target:Sinhala
Traditional Translation Batch Size (Lines): 5
Dont dubbing: self.cfg.voice_role='No'
Soft Subtitles
video duration:142233ms
video information:{'video_fps': 30.0, 'r_frame_rate': 30.0, 'video_codec_name': 'h264', 'audio_codec_name': 'aac', 'width': 1080, 'height': 1920, 'time': 142233, 'streams_len': 2, 'streams_audio': 1, 'video_streams': 1, 'color': 'yuv420p'}
self.cfg=TaskCfgVTT(uuid='c209a24d84', name='E:/New folder (6)/Daisy’s Five Shadow Roommates/1.mp4', dirname='E:/New folder (6)/Daisy’s Five Shadow Roommates', noextname='1', basename='1.mp4', ext='mp4', target_dir='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4', cache_folder='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84', is_cuda=False, source_language='Simplified Chinese', source_language_code='zh-cn', source_sub='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4/zh-cn.srt', source_wav='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84/zh-cn.wav', source_wav_output='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4/zh-cn.m4a', target_language='Sinhala', target_language_code='si', target_sub='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4/si.srt', target_wav='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84/target.wav', target_wav_output='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4/si.m4a', translate_type=0, tts_type=0, volume='+0%', pitch='+0Hz', voice_rate='+0%', voice_role='No', voice_autorate=True, video_autorate=False, remove_silent_mid=False, align_sub_audio=True, tts_model_name=None, detect_language='zh', recogn_type=0, model_name='large-v3-turbo', shibie_audio=None, remove_noise=False, enable_diariz=False, nums_diariz=0, rephrase=False, fix_punc=0, app_mode='biaozhun', subtitle_language=None, targetdir_mp4='E:/New folder (6)/Daisy’s Five Shadow Roommates/_video_out/1-mp4/1.mp4', novoice_mp4='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84/novoice.mp4', is_separate=False, embed_bgm=True, instrument='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84/instrument.wav', vocal='C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19/tmp/1404/c209a24d84/vocal.wav', clear_cache=True, background_music='', subtitle_type=2, only_out_mp4=False, recogn2pass=False, output_srt=0, copysrt_rawvideo=False, loop_backaudio=1, backaudio_volume=0.8, batch=False)
video_duration_ms=142233


=
system:Windows-10-10.0.26100-SP0
version:v4.19
frozen:True
language:en_US
root_dir:C:/Users/ayshe/Downloads/win-pyvideotrans-v4.19

1 Replies

#1 DeepSeek reply at 23 minutes ago

The root cause of this error: the Google Translate (Free) channel returned content that was not JSON (typically an HTML error page or an empty response), so parsing threw JSONDecodeError; after that, the automatic fallback to Microsoft Translate also got an empty/non-JSON response. Two factors combined:

  1. The target language Sinhala (si) is a rare language. Google Translate (Free) / Microsoft Translate (Free) / other traditional translation APIs either do not support Sinhala or define its language code differently, so it is very easy to get an invalid response back. The knowledge base explicitly lists si: Sinhala among the "only recommended to use AI channels" languages.
  2. The network does not reach Google, or the proxy node is blocked. Google Translate requires a working proxy in mainland China; if the node IP is flagged (429) or the proxy is not configured/set incorrectly, Google returns a non-JSON page.

Solution (in order):

  1. Change the translation channel in the main interface to an AI large-model channel (first choice: DeepSeek; also possible: Gemini / OpenAI ChatGPT / Zhipu AI). AI channels translate based on semantics and do not depend on the API's language code, so rare languages such as Sinhala work reliably.

    • If you choose DeepSeek: open the menu Translation Settings - DeepSeek, fill in the Secret Key, and optionally set "Thinking Depth" to none to turn off thinking mode (saves tokens and avoids truncation).
  2. If you must use Google Translate, you have to fill in the Proxy field on the right side of the main interface with an actually working proxy, in the format http://127.0.0.1:7890; make sure the proxy service is running and the port is correct. Also switch to a cleaner node, otherwise Google will still return 429/non-JSON.
  3. After the modification, click Start Execution again; Clear Output is already checked, so it will not reuse the failed cache. If you change the translation channel but the result still shows old content, manually delete the files in the tmp/translate_cache/ directory under the software root directory.
  4. Additional check: if you later enable dubbing, note that Sinhala dubbing also needs a TTS channel that supports it; Edge-TTS is the safest choice.

Please refer to the related documentation:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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

Related resource