Beta 1.20 - Gradio DataFrame Error After Translation Completes
What happened?
After a fresh install of ZastTranslate Beta 1.20, I successfully imported and transcribed a Hindi video and then translated it to English.
The translation itself completed successfully:
Translation complete: 19 segments
Normal translation complete: 19 segments
Immediately afterward, ZastTranslate threw a Gradio/DataFrame error while processing the translation output:
AttributeError: 'NoneType' object has no attribute 'headers'
The error references the step5_save_translation event handler and a Gradio DataFrame component.
The application did continue afterward and began loading the VoxCPM2 TTS backend, but the exception occurred after the translation stage completed.
I also noticed a Gradio 6 migration warning when ZastTranslate starts:
UserWarning: The parameters have been moved from the Blocks constructor to the launch() method in Gradio 6.0
This was a completely fresh installation.
Steps to reproduce
- Install ZastTranslate Beta 1.20 through Pinokio.
- Start ZastTranslate.
- Import a local Hindi MP4 video.
- Set Source Language to Hindi.
- Set Whisper Model to
large-v3. - Set LLM Model to
Qwen2.5-7B-Instruct. - Run transcription.
- Run English translation.
- Wait for translation to complete.
- After the translation finishes, the Gradio/DataFrame exception occurs while processing/saving the translated segments.
The translated video in my test was approximately 5 minutes 24 seconds long and produced 19 translation segments.
Your system (OS / GPU / RAM / VRAM / etc.)
Windows 11 Home 64-bit
CPU: AMD Ryzen 5 5500, 6 cores / 12 threads
GPU: NVIDIA GeForce RTX 4060
Dedicated VRAM: 8 GB
System RAM: 64 GB
NVIDIA Driver: 32.0.16.1088
DirectX: 12
Python environment appears to be Python 3.10.
ZastTranslate: Beta 1.20
Installed and launched through Pinokio.
During processing, the RTX 4060 was actively being used. Task Manager showed approximately 95% GPU utilization, 7.7 / 8.0 GB dedicated GPU memory in use, and approximately 10.9 GB shared GPU memory in use.
Logs / full error output
[Qwen2.5-7B-Instruct-Q4_K_M] gpu: reconstructing file: 100%
llama_new_context_with_model: n_ctx_per_seq (4096) < n_ctx_train (32768) -- the full capacity of the model will not be utilized
LlamaCpp: RAM Prompt Caching (KV Cache) enabled (512MB capacity)
[Qwen2.5-7B-Instruct (Ideal for 8 GB VRAM GPUs)] C++ Engine active and ready.
LLM Translation -> English (19 segments, batch=8, CPS=8.5)...
8/19 segments translated
[RETRY] Segment [269.6-271.3]: 29 chars > 14 limit, retrying with 9
16/19 segments translated
19/19 segments translated
Translation complete: 19 segments
Reformulating 1 overflowing segments using GPU-batched inference...
Reformulated [269.6-271.3]: 18->16 chars
Reformulated 1 segments to fit timing
Normal Translation -> English (19 segments, batch=8, natural/full)...
8/19 segments translated (normal)
16/19 segments translated (normal)
19/19 segments translated (normal)
Normal translation complete: 19 segments
Traceback (most recent call last):
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\blocks.py", line 1908, in preprocess_data
processed_value = await anyio.to_thread.run_sync(
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\anyio\to_thread.py", line 65, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\anyio\_backends\_asyncio.py", line 2706, in run_sync_in_worker_thread
return await future
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\anyio\_backends\_asyncio.py", line 1100, in run
result = context.run(func, *args)
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\components\dataframe.py", line 284, in preprocess
if payload.headers is not None:
AttributeError: 'NoneType' object has no attribute 'headers'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\queueing.py", line 882, in process_events
response = await route_utils.call_process_api(
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\route_utils.py", line 410, in call_process_api
output = await app.get_blocks().process_api(
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\blocks.py", line 2324, in process_api
inputs = await self.preprocess_data(
File "C:\pinokio\api\ZastTranslate.git\env\lib\site-packages\gradio\blocks.py", line 1914, in preprocess_data
raise ComponentProcessingError(
gradio.exceptions.ComponentProcessingError:
Could not preprocess input component at index 0
(a 'dataframe' component)
of the event handler (named 'step5_save_translation')
with input components: [dataframe, radio, textbox, textbox].
Expected a 'DataframeData', but the value passed to the event handler was: None (of type 'NoneType').
Original error:
AttributeError: 'NoneType' object has no attribute 'headers'
Using default TTS voice (no cloning)...
Loading VoxCPM 2 Backend (with denoiser/ZipEnhancer)...
Loading AudioVAE from pytorch...
Running on device: cuda, dtype: bfloat16
Loaded VoxCPM2 model
There is also this startup warning:
UserWarning: The parameters have been moved from the Blocks constructor to the launch() method in Gradio 6.0: theme.
Please pass these parameters to launch() instead.
The translation appears to finish correctly. The failure seems to occur when the translated DataFrame is passed into step5_save_translation, where Gradio receives None instead of the expected DataframeData.
