#5852 程序内部错误:'NoneType' object has no attribute 'seek'Traceback (most recent call last):

45.221* Posted at: 5 hours ago

程序内部错误:'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='D:/soft/win-pyvideotrans-v3.92/tmp/15624/dd3f4aca4f', target_dir='C:/Users/hzl/Downloads/Video', 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='zh-cn', source_sub=None, target_sub='C:/Users/hzl/Downloads/Video/AI 助手的使用方式.srt', source_wav=None, source_wav_output=None, target_wav='C:/Users/hzl/Downloads/Video/AI 助手的使用方式.m4a', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='AI 助手的使用方式', 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='Yunyang(Male/CN)', 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='C:/Users/hzl/Downloads/Video/AI 助手的使用方式.srt', basename='AI 助手的使用方式.srt', ext='srt', dirname='C:/Users/hzl/Downloads/Video', shound_del_name=None, uuid='dd3f4aca4f', 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.26200-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/soft/win-pyvideotrans-v3.92

1 Replies

这是由于配音生成的音频文件缺失导致的。在批量为字幕配音并开启音频自动加速时,程序需要合并每个字幕的配音片段,但部分片段文件不存在(例如 Edge-TTS 因限流或超时未能成功生成),导致 pydub 无法读取。

解决方案:

  1. 检查软件安装目录下的 tmp/[进程ID]/[任务UUID]/ 文件夹,查看 .wav.mp3 配音文件是否全部生成。如果有缺失,说明配音阶段出了问题。
  2. 降低 Edge-TTS 的调用频率(如果使用 Edge-TTS):

    • 进入 菜单 → 工具/选项 → 高级选项 → 字幕配音调整,将 EdgeTTS配音渠道配音并发数 设为 1
    • 配音后暂停秒 设为 5~10
  3. 清除缓存:在主界面勾选 清理已生成,然后重新执行任务。
  4. 升级软件版本:你当前使用的是 v3.92,建议下载最新完整版 v4.06(官网 https://pyvideotrans.com ),新版本优化了配音错误处理和重试机制,可显著减少此类问题。

请查阅相关文档:

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.

Dondate via ko-fi.com

Dondate via PayPal

Related resource