#3035 TaskCfg(cache_folder='D:/SPFY/tmp/4548/43ab6e5b18', target_dir='d:/spfy/output/tts', remove_noise=False, is_separate=Fal

188.253* Posted at: 15 days ago 👁29

程序内部错误:'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:/SPFY/tmp/4548/43ab6e5b18', target_dir='d:/spfy/output/tts', 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='D:/SPFY/tmp/4548/20260202-002224.srt', source_wav=None, source_wav_output=None, target_wav='d:/spfy/output/tts/20260202-002224.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='20260202-002224', shibie_audio=None, targetdir_mp4=None, instrument=None, vocal=None, back_audio=None, background_music=None, app_mode='biaozhun', subtitle_type=0, volume='+10%', pitch='+0Hz', voice_rate='+2%', voice_role='Yunxi(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='D:/SPFY/tmp/4548/20260202-002224.srt', basename='20260202-002224.srt', ext='srt', dirname='D:/SPFY/tmp/4548', shound_del_name=None, uuid='43ab6e5b18', 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.19045-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/SPFY

1 Replies

该错误是由于 pydub 库在读取音频文件时,文件路径或文件内容存在问题,导致返回了 None 对象,进而无法执行 seek 操作。

解决方案:

  1. 检查文件路径:确认任务配置中 target_wav='d:/spfy/output/tts/20260202-002224.wav' 指向的音频文件是否存在,以及路径是否包含中文字符或特殊符号(路径应避免使用中文和空格)。
  2. 检查音频文件完整性:确认 d:/spfy/output/tts/20260202-002224.wav 文件是否已成功生成且未被损坏。可以尝试手动用播放器打开该文件。
  3. 检查临时文件:错误发生在 _concat_audio 阶段,可能是拼接前的某个分段音频文件生成失败。请检查临时文件夹 D:/SPFY/tmp/4548/43ab6e5b18 中是否存在损坏或空的音频文件。
  4. 重新生成:清理缓存后重新执行任务。在软件菜单中,选择“工具” -> “清理缓存”,然后重新处理该任务。
  5. 检查配音渠道:根据配置 tts_type=0voice_role='Yunxi(Male/CN)',您可能在使用 Edge-TTS 或类似渠道。如果配音线程数过高,可能导致生成的文件异常。请进入“高级选项”,将“同时配音线程数”设为 1,并将“配音后暂停秒数”设为 5 秒,然后重试。

如果以上步骤无法解决,请提供软件安装目录下 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.

Related resource