harry0703 / MoneyPrinterTurbo

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

部署报错,麻烦作者帮忙看看 #393

Closed b1ush closed 1 month ago

b1ush commented 1 month ago

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script exec(code, module.dict) File "/mount/src/zhinengshijie/webui/MainApp.py", line 456, in result = tm.start(task_id=task_id, params=params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mount/src/zhinengshijie/app/services/task.py", line 155, in start video.generate_video(video_path=combined_video_path, File "/mount/src/zhinengshijie/app/services/video.py", line 241, in generate_video sub = SubtitlesClip(subtitles=subtitle_path, encoding='utf-8') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/tools/subtitles.py", line 104, in init hasmask = bool(self.make_textclip("T").mask) ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/tools/subtitles.py", line 58, in make_textclip return TextClip( ^^^^^^^^^ File "", line 2, in init File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/decorators.py", line 89, in wrapper return f(*new_a, **new_kw) ^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/moviepy/video/VideoClip.py", line 1272, in init raise IOError(error)

b1ush commented 1 month ago

反馈说是因为MoviePy Error: creation of None failed because of the following error:

[Errno 2] No such file or directory: 'unset'.

.This error can be due to the fact that ImageMagick is not installed on your

computer, or (for Windows users) that you didn't specify the path to the

ImageMagick binary. Check the documentation. 但是使用docker做的部署。

harry0703 commented 1 month ago

建议删掉镜像重新部署一下,看看过程中,是否有依赖安装错误(不完整)

b1ush commented 1 month ago

感谢您百忙之中回复我的问题,但我尝试过重新部署,依旧显示无法运行。经过检测,我确信问题发生在字幕编辑的环节,很可能是由于ImageMagick没有正确安装的原因,我尝试使用您的原生项目重新部署也是如此。请问我是否需要重新初始化docker容器以修复这个问题。再次表达对您的感谢。

harry0703 commented 1 month ago

请问你是ubuntu系统吗?是否有尝试过apt安装或更新一下ImageMagick 然后在 config.toml 里面指定 ImageMagick 的路径 imagemagick_path

b1ush commented 1 month ago

您好,我是使用windows系统尝试在streamlit上运行并将它作为我们课程的学习案例使用。在昨天中午十二点以前项目运转的很完美,不知道为何在那之后项目突然出现了部署问题,ImageMagick 无法被正常调用字幕功能就出现了崩溃。我在本地部署过项目运行的非常完美,麻烦您帮我解惑。万分感谢

harry0703 commented 1 month ago

Windows系统,你其实可以直接下载一键启动包,里面包含了运行环境,和 ImageMagick,FFMpeg 等组件。 或者你可以把这个傻瓜包里面的 ImageMagick,FFMpeg 拿出来,设置到你手动部署的配置里面,看看能不能跑起来

b1ush commented 1 month ago

好的!感谢您提供的解决方案,我会进行尝试。感谢您做出的贡献