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

2a09:bac5* Posted at: 19 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='E:/win-pyvideotrans-v3.92/tmp/14356/9f67f1fd8e', 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='zh-cn', source_sub=None, target_sub='E:/录屏/新建文件夹/Ps Beta 版AI 助手的使用方式1.srt', source_wav=None, source_wav_output=None, target_wav='E:/录屏/新建文件夹/Ps Beta 版AI 助手的使用方式1.m4a', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='Ps Beta 版AI 助手的使用方式1', 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='E:/录屏/新建文件夹/Ps Beta 版AI 助手的使用方式1.srt', basename='Ps Beta 版AI 助手的使用方式1.srt', ext='srt', dirname='E:/录屏/新建文件夹', shound_del_name=None, uuid='9f67f1fd8e', 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:E:/win-pyvideotrans-v3.92

1 Replies

这是配音对齐阶段,在拼接音频时发现某个字幕行对应的配音文件为空(None)导致的。通常是该行字幕未成功生成配音,或输入 SRT 格式不规范、文件路径含中文/特殊字符引起底层读取失败。

请按以下顺序排查:

  1. 检查输入的 SRT 字幕是否符合标准格式:每行要有正确的开始/结束时间,结束时间大于开始时间,下一条开始时间不能早于上一条结束时间;删除空行和无效行。
  2. 确认每一行字幕都已生成配音文件。若勾选了「配音加速」,某行没有配音文件时会在此步骤直接报错。
  3. 使用 Edge-TTS 时,请在「菜单 → 工具 → 高级选项 → 字幕配音调整」中将 EdgeTTS配音渠道配音并发数 设为 1配音后暂停秒 设为 5-10,避免限流导致个别片段生成失败。
  4. 将字幕文件、输出目录统一改为纯英文路径(例如 E:/output),不要在中文目录下处理。
  5. 当前版本 v3.92 较旧,建议升级到最新版 v4.08-0802 后重试。

若以上操作后仍然报错,请提供软件安装目录下 logs/ 文件夹中最新日志文件,或复制底部约 30 行报错信息。

请查阅相关文档:

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