#2560 TaskCfg(cache_folder='D:/SOS/win-pyvideotrans-v3.92/tmp/19672/97b5ed3988', target_dir='D:/SOS/win-pyvideotrans-v3.92/out

59.56* Posted at: 2 days ago 👁15

程序内部错误:'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:/SOS/win-pyvideotrans-v3.92/tmp/19672/97b5ed3988', target_dir='D:/SOS/win-pyvideotrans-v3.92/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:/SOS/win-pyvideotrans-v3.92/output/tts/juy-035.srt', source_wav=None, source_wav_output=None, target_wav='D:/SOS/win-pyvideotrans-v3.92/output/tts/juy-035.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='juy-035', 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='Xiaoyi(Female/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:/SOS/win-pyvideotrans-v3.92/output/tts/juy-035.srt', basename='juy-035.srt', ext='srt', dirname='D:/SOS/win-pyvideotrans-v3.92/output/tts', shound_del_name=None, uuid='97b5ed3988', 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:zh
root_dir:D:/SOS/win-pyvideotrans-v3.92

1 Replies

这个错误表明在尝试读取音频文件时,文件对象为 None,导致 pydub 库无法执行 seek 操作。根据错误堆栈和 TaskCfg 信息,您正在执行“批量为字幕配音”功能,且使用了 voice_autorate=True(音频自动加速)。

核心原因:在音频加速处理过程中,用于拼接的某个临时音频文件可能未被正确生成或路径为空。

解决方案

  1. 检查输入文件:确认您的字幕文件 D:/SOS/win-pyvideotrans-v3.92/output/tts/juy-035.srt 格式正确且内容完整。
  2. 关闭音频加速:在“批量为字幕配音”界面,取消勾选“自动调整音频时长”(即 voice_autorate)。这是最直接的解决方法,因为加速功能在拼接多个音频片段时更容易出错。
  3. 清理缓存并重试:在“批量为字幕配音”界面,勾选“清理已生成”,然后重新处理。
  4. 检查输出目录权限:确保软件对 D:/SOS/win-pyvideotrans-v3.92/output/tts/ 目录有完整的读写权限。

如果以上步骤无效,请提供 D:/SOS/win-pyvideotrans-v3.92/logs/ 目录下最新的日志文件,以便进一步分析。

请查看更多参考文档:

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