#2359 TaskCfg(cache_folder='E:/ztrans/tmp/15392/50c8a52eb3', target_dir='E:/PH', remove_noise=False, is_separate=False, detect

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/15392/50c8a52eb3', target_dir='E:/PH', 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:/PH/001.srt', source_wav=None, source_wav_output=None, target_wav='E:/PH/001.mp3', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='001', 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='Jenny(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:/PH/001.srt', basename='001.srt', ext='srt', dirname='E:/PH', shound_del_name=None, uuid='50c8a52eb3', 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

The error 'NoneType' object has no attribute 'seek' indicates that the software failed to load the audio file (001.mp3) during the audio concatenation process for alignment. This is likely because the file is corrupted, incomplete, or the path is inaccessible.

Based on the provided TaskCfg, you are processing a subtitle file (001.srt) to generate an audio file (001.mp3) using Edge-TTS (tts_type=0) and then attempting to align the audio with the subtitle timings (voice_autorate=True, align_sub_audio=False). The error occurs in the final concatenation step.

Please follow these steps to resolve the issue:

  1. Check the Generated Audio File:

    • Navigate to E:/PH/ and locate the file 001.mp3.
    • Try playing it with a standard media player (e.g., VLC, Windows Media Player). If it doesn't play or is silent, the file is corrupted.
  2. Re-run with Cache Cleared:

    • In the main interface, ensure the "Clean generated" checkbox is checked.
    • Process the 001.srt file again. This will force the software to regenerate the 001.mp3 file from scratch.
  3. Verify Output Directory Permissions:

    • Ensure you have full read/write permissions for the output directory E:/PH. Avoid using system-protected directories.
  4. Temporarily Disable Audio Alignment:

    • If the problem persists, try processing the file without audio alignment. In the main interface, uncheck the "Voice auto-rate" option before starting the task. This will skip the step that caused the error.
  5. Check for Antivirus Interference:

    • Temporarily disable your antivirus or Windows Defender real-time protection and try again. Sometimes security software can interfere with file creation.

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

Useful documentation link: How to align subtitles, audio, and video

where can i send the log file?

You can upload the log file to a file-sharing service (like Google Drive, Dropbox, or WeTransfer) and share the link here. Alternatively, you can paste the most recent error lines directly into your reply.

The log files are located in the logs folder within your pyVideoTrans installation directory. Based on your error message, the path should be:
E:/ztrans/logs/

Look for the most recent .log file (e.g., 2025-01-15.log). That file contains the detailed error trace.

Please share the relevant portion of the log, especially the lines surrounding the AttributeError: 'NoneType' object has no attribute 'seek' error.

2025-12-30 10:09:56,111 - 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'
2025-12-30 10:09:56,111 - 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'
Successfully killed ffmpeg processes using taskkill

The error indicates that the audio file 001.mp3 generated by Edge-TTS is corrupted or empty when the software tries to load it for concatenation during the alignment process. This is a known issue that can occur with Edge-TTS under high concurrency or network instability.

Here are the specific steps to fix this:

  1. Clear Cache and Retry:

    • In the main interface, ensure the "Clean generated" checkbox is checked.
    • Process the 001.srt file again. This will force a fresh download/generation of the 001.mp3 file.
  2. Reduce Edge-TTS Concurrency (Most Likely Solution):

    • Go to Menu -> Tools/Options -> Advanced Options.
    • In the "Dubbing Adjustments" section:

      • Set "Concurrent dubbing threads" to 1.
      • Set "Pause after dubbing (seconds)" to 3 or 5.
    • This significantly reduces the load on the Edge-TTS service and improves stability.
  3. Check the Output File Manually:

    • After the error, navigate to E:/PH/ and check the size of 001.mp3. If it's 0 KB or unusually small (a few KB), it's corrupted. Delete it manually before retrying.
  4. Temporarily Disable Alignment:

    • If you need a quick result, in the main interface, uncheck the "Voice auto-rate" option before processing. This will skip the alignment step that is failing. You can align the audio later using the "Subtitle & Audio Alignment" tool in the toolbox.
  5. Network and Antivirus:

    • Ensure a stable internet connection.
    • Temporarily disable any antivirus or firewall that might be blocking or interrupting the file write process.

If the problem persists after trying these steps, the issue might be specific to the Edge-TTS service for the chosen voice (Jenny). You can try selecting a different Edge-TTS voice role and see if it completes successfully.

Useful documentation link: Edge-TTS配音出错

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