MoneyPrinterTurbo icon indicating copy to clipboard operation
MoneyPrinterTurbo copied to clipboard

TypeError: must be real number, not NoneType

Open lylgxy888 opened this issue 3 months ago • 4 comments

TypeError: must be real number, not NoneType Traceback: File "anaconda3\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 542, in _run_script exec(code, module.dict) File "MoneyPrinterTurbo\webui\Main.py", line 264, in tm.start(task_id=task_id, params=cfg) File "MoneyPrinterTurbo\app\services\task.py", line 139, in start video.combine_videos(combined_video_path=combined_video_path, File "MoneyPrinterTurbo\app\services\video.py", line 95, in combine_videos final_clip.write_videofile(combined_video_path, threads=threads) File "anaconda3\Lib\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\moviepy\decorators.py", line 54, in requires_duration return f(clip, *a, **k) ^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\moviepy\decorators.py", line 135, in use_clip_fps_by_default return f(clip, *new_a, **new_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB return f(clip, *a, **k) ^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\moviepy\video\VideoClip.py", line 300, in write_videofile ffmpeg_write_video(self, filename, fps, codec, File "anaconda3\Lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 213, in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec = codec, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "anaconda3\Lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 88, in init '-r', '%.02f' % fps, ~~~~~~~~^~~~~

lylgxy888 avatar Mar 29 '24 04:03 lylgxy888

检查下ffmpeg的版本看看,感觉是版本过低,一些指令无法识别导致的

执行

ffmpeg

harry0703 avatar Mar 29 '24 10:03 harry0703

更换了最新的ffmpeg,还是出现了同样的问题:(

lylgxy888 avatar Mar 30 '24 01:03 lylgxy888

同样的问题 ffmpeg version 4.3.1

lihuazero avatar Apr 02 '24 08:04 lihuazero

添加了docker,到根目录下面执行 docker-compose up 然后试试看

harry0703 avatar Apr 04 '24 02:04 harry0703

已修复,更新代码

harry0703 avatar Apr 13 '24 13:04 harry0703