#2396 TaskCfg(cache_folder='E:/ztrans/tmp/5428/5ae02b3a1f', target_dir='E:/', remove_noise=False, is_separate=False, detect_la

202.150* Posted at: 3 hours ago 👁9

'NoneType' object has no attribute 'seek'
Traceback (most recent call last):
File "pydub\audio_segment.py", line 670, in from_file
File "pydub\audio_segment.py", line 818, in _from_safe_wav
AttributeError: 'NoneType' object has no attribute 'seek'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 259, in run
File "videotrans\task\_dubbing.py", line 268, in align
File "videotrans\task\_rate.py", line 278, in run
File "videotrans\task\_rate.py", line 819, in _concat_audio
File "pydub\audio_segment.py", line 678, in from_file
AttributeError: 'NoneType' object has no attribute 'seek'

TaskCfg(cache_folder='E:/ztrans/tmp/5428/5ae02b3a1f', target_dir='E:/', remove_noise=False, is_separate=False, detect_language=None, subtitle_language=None, source_language=None, target_language=None, source_language_code=None, target_language_code='en', source_sub=None, target_sub='E:/003.srt', source_wav=None, source_wav_output=None, target_wav='E://003.mp3', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='003', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+50%', pitch='+0Hz', voice_rate='+15%', voice_role='EmmaMultilingual(Female/US)', copysrt_rawvideo=False, clear_cache=False, translate_type=None, tts_type=0, recogn_type=None, model_name=None, split_type=0, voice_autorate=True, video_autorate=False, cuda=False, name='E:/003.srt', basename='003.srt', ext='srt', dirname='E:/', shound_del_name=None, uuid='5ae02b3a1f', remove_silent_mid=False, align_sub_audio=False, enable_diariz=False, nums_diariz=0, rephrase=2, only_out_mp4=False)


=
system:Windows-10-10.0.26100-SP0
version:v3.92
frozen:True
language:en
root_dir:E:/ztrans

5 Replies

This error indicates that the software failed to load an audio file (likely the generated MP3) because the file object is None. This is often caused by file corruption, incomplete download, or the file being deleted/blocked by antivirus software during processing.

Based on the TaskCfg information, you are using the "Batch Dubbing for Subtitles" tool (app_mode='biaozhun', name='E:/003.srt') with Edge-TTS (tts_type=0) and audio auto-acceleration (voice_autorate=True). The error occurred during the audio concatenation step after acceleration.

Please follow these steps to resolve the issue:

  1. Check the Generated Audio File:

    • Navigate to the temporary folder: E:/ztrans/tmp/5428/5ae02b3a1f/.
    • Look for .mp3 or .wav files. Try playing them with a media player. If they are corrupted or unplayable, proceed to step 2.
  2. Disable Antivirus Interference (Most Likely Cause):

    • Temporarily disable your antivirus software (including Windows Defender real-time protection).
    • Add the entire pyVideoTrans software directory to your antivirus exclusion/whitelist.
    • Important: If you are using the pre-packaged version (sp.exe), ensure it is extracted to a simple path like D:\videotrans\ (no spaces, no Chinese characters, not in Program Files).
  3. Run a Clean Process:

    • In the main interface of the "Batch Dubbing for Subtitles" tool, check the box "Clean Generated" (clear_cache=True in your config).
    • Re-process the SRT file.
  4. If the Problem Persists:

    • Try using a different TTS voice role.
    • In the Tools -> Options -> Advanced Options menu, under the "Dubbing Adjustments" section, reduce the "Concurrent Dubbing Threads" to 1 and increase the "Pause After Dubbing (seconds)" to 5 to reduce load on Edge-TTS servers.
  5. As a Last Resort (if only this file fails):

    • The SRT file E:/003.srt might have encoding issues. Try saving it again with UTF-8 encoding using a text editor like Notepad++.

If the issue continues after these steps, please provide the complete log file from E:/ztrans/logs/ for further diagnosis.

Reference Documentation:

2026-01-01 11:06:38,408 - ERROR - 'NoneType' object has no attribute 'seek'
Traceback (most recent call last):
File "pydub\audio_segment.py", line 670, in from_file
File "pydub\audio_segment.py", line 818, in _from_safe_wav
AttributeError: 'NoneType' object has no attribute 'seek'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 259, in run
File "videotrans\task\_dubbing.py", line 268, in align
File "videotrans\task\_rate.py", line 278, in run
File "videotrans\task\_rate.py", line 819, in _concat_audio
File "pydub\audio_segment.py", line 678, in from_file
AttributeError: 'NoneType' object has no attribute 'seek'
2026-01-01 11:06:38,408 - ERROR - 'NoneType' object has no attribute 'seek'
Traceback (most recent call last):
File "pydub\audio_segment.py", line 670, in from_file
File "pydub\audio_segment.py", line 818, in _from_safe_wav
AttributeError: 'NoneType' object has no attribute 'seek'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\job.py", line 259, in run
File "videotrans\task\_dubbing.py", line 268, in align
File "videotrans\task\_rate.py", line 278, in run
File "videotrans\task\_rate.py", line 819, in _concat_audio
File "pydub\audio_segment.py", line 678, in from_file
AttributeError: 'NoneType' object has no attribute 'seek'

This error is a file I/O issue where pydub (the audio processing library) cannot read the generated audio file because it's None or corrupted. Based on your configuration and the repeated error, the most likely cause is antivirus software interference or insufficient disk permissions in the temporary directory.

Here is a step-by-step solution:

1. Immediate Fix: Check the Temporary File

  • Go to the temporary folder: E:/ztrans/tmp/5428/5ae02b3a1f/.
  • Look for a file named 003.mp3 (or similar .wav files). Try to open it with a media player like VLC.
  • If the file is missing, 0 bytes, or unplayable, it confirms the file was not created correctly or was deleted immediately after creation.

2. Primary Action: Antivirus & Permissions

  • Temporarily disable your antivirus software (including Windows Defender's real-time protection).
  • Add an exclusion for the entire E:/ztrans/ folder (or wherever your pyVideoTrans directory is located) in your antivirus settings.
  • Run the software as Administrator to ensure it has full write permissions to the E: drive.

3. Re-run with Clean Cache

  • In the "Batch Dubbing for Subtitles" tool interface, ensure the "Clean Generated" checkbox is checked.
  • Re-process the 003.srt file.

4. If the Problem Persists: Advanced Troubleshooting

  • Change the output path: Try saving the final audio to a different, simpler location (e.g., D:/output/).
  • Disable audio acceleration: In the tool's interface, uncheck the "Audio Auto-accelerate" (voice_autorate) option. Process the file. If it succeeds, the issue is specific to the acceleration/concat step.
  • Check disk space: Ensure the E: drive has sufficient free space.

5. Final Diagnostic Step

If none of the above works, please provide the complete log file from E:/ztrans/logs/. The snippet you shared is an error trace, but the full log may contain earlier warnings about file creation failures.

i need the audio auto-accelerate, is there no fix for this?

Yes, there is a fix. The error occurs during the audio concatenation step after acceleration, meaning the individual accelerated audio segments are being created but then cannot be read back to be stitched together. This is almost certainly a file permission or antivirus lock issue specific to the temporary working directory.Here is the targeted solution to keep audio auto-accelerate enabled:1. Change the Software's Temporary Directory (Most Effective Fix):

*   The current temp path `E:/ztrans/tmp/` might be on a network drive, a drive with restrictive permissions, or heavily monitored by antivirus.
*   **Move the entire `pyVideoTrans` folder to a simple local path:** `D:\videotrans\`.
*   **Why this works:** A local root directory (like `D:\`) with a short, all-English path has the fewest permission hurdles and is less likely to trigger aggressive real-time scanning from security software during rapid file creation/deletion cycles (which acceleration performs).
  1. Grant Explicit Permissions (If you cannot move the folder):

    • Right-click on the E:/ztrans/ folder.
    • Select Properties -> Security -> Edit.
    • Add "Everyone" or your user account and grant Full control.
    • Click Apply and ensure it applies to all subfolders and files.
  2. Configure Antivirus Exclusions (Critical):

    • Add the folder E:/ztrans/tmp/ (or the new D:\videotrans\tmp\) to your antivirus exclusion list. This prevents the antivirus from locking or quarantining temporary .wav/.mp3 files the moment they are created.
  3. Run the software as Administrator once after making these changes to ensure it can create and modify files freely in the chosen directory.

The core issue is not with the auto-accelerate feature itself, but with the system environment preventing the software from reliably reading the temporary audio files it creates. Changing the working directory to a local, permissive path is the standard solution for this class of 'NoneType' object has no attribute 'seek' errors in pyVideoTrans.

Reference:

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