#3484 TaskCfg(cache_folder='D:/SOS/win-pyvideotrans-v3.92/tmp/4240/cd51eac79a', target_dir='F:/沙漏/NGOD-282', remove_noise=Fals

27.151* Posted at: 5 hours ago 👁5

程序内部错误:'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/4240/cd51eac79a', target_dir='F:/沙漏/NGOD-282', 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='F:/沙漏/NGOD-282/luna_NGOD-282.ja.srt', source_wav=None, source_wav_output=None, target_wav='F:/沙漏/NGOD-282/luna_NGOD-282.ja.wav', target_wav_output=None, subtitles=None, novoice_mp4=None, noextname='luna_NGOD-282.ja', 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='Xiaoxiao(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='F:/沙漏/NGOD-282/luna_NGOD-282.ja.srt', basename='luna_NGOD-282.ja.srt', ext='srt', dirname='F:/沙漏/NGOD-282', shound_del_name=None, uuid='cd51eac79a', 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:/SOS/win-pyvideotrans-v3.92

1 Replies

该错误是由于在音画对齐阶段,尝试加载一个不存在的音频文件(NoneType)导致的。具体发生在 _concat_audio 函数中,pydub 库无法从文件路径读取到有效的音频数据。

解决方案:

  1. 升级软件版本:您当前使用的是 v3.92。根据知识库第6.6节,v3.97 版本已修复了许多类似问题。请首先尝试升级到最新版本 v3.97。
  2. 检查配音文件:在升级后,重新运行任务。如果问题依旧,请检查任务配置中的 target_wav 路径(F:/沙漏/NGOD-282/luna_NGOD-282.ja.wav)对应的 .wav 文件是否存在且完整。该文件是配音阶段生成的音频文件。
  3. 调整对齐设置:在任务配置中,voice_autorate=True(配音加速)已开启,但 align_sub_audio=False(强制对齐字幕和声音)为关闭状态。您可以尝试在“同步对齐”行同时勾选“配音加速”和“视频慢速”,并确保“强制对齐字幕和声音”选项被勾选。
  4. 清理缓存并重试:在软件菜单“工具”->“清理缓存”中,清理临时文件,然后重新处理视频。

如果升级到 v3.97 后问题仍然存在,请提供新的日志文件底部约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