harry0703 / MoneyPrinterTurbo

利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
MIT License
14.7k stars 2.26k forks source link

偶尔到了生成字幕的时候会出错,说是字幕序列为空? #211

Closed cheng0009 closed 2 months ago

cheng0009 commented 3 months ago

ValueError: max() arg is an empty sequence Traceback: File "E:\Anaconda\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 542, in _run_script exec(code, module.dict) File "D:\MoneyPrinterTurbo-main\webui\Main.py", line 154, in tm.start(task_id=task_id, params=cfg) File "D:\MoneyPrinterTurbo-main\app\services\task.py", line 99, in start video.generate_video(video_path=combined_video_path, File "D:\MoneyPrinterTurbo-main\app\services\video.py", line 184, in generate_video subtitles = SubtitlesClip(subtitles=subtitle_path, make_textclip=generator, encoding='utf-8') File "E:\Anaconda\lib\site-packages\moviepy\video\tools\subtitles.py", line 69, in init self.duration = max([tb for ((ta, tb), txt) in self.subtitles])

harry0703 commented 3 months ago

方便把 storage/tasks 下面对应的 script.jsonsubtitle.srt 打包上传到这里我看看么