Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: MoviePy Error: creation of None failed because of the following error #307

Closed
lzb-dream opened this issue Apr 23, 2024 · 2 comments

Comments

@lzb-dream
Copy link

OSError: MoviePy Error: creation of None failed because of the following error: [WinError 2] 系统找不到指定的文件。. .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.
Traceback:
File "C:\myporject\AI\MoneyPrinterTurbo\venv\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 584, in _run_script
exec(code, module.dict)
File "C:\myporject\AI\MoneyPrinterTurbo\webui\Main.py", line 529, in
result = tm.start(task_id=task_id, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\myporject\AI\MoneyPrinterTurbo\app\services\task.py", line 159, in start
video.generate_video(video_path=combined_video_path,
File "C:\myporject\AI\MoneyPrinterTurbo\app\services\video.py", line 241, in generate_video
sub = SubtitlesClip(subtitles=subtitle_path, encoding='utf-8')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\myporject\AI\MoneyPrinterTurbo\venv\Lib\site-packages\moviepy\video\tools\subtitles.py", line 104, in init
hasmask = bool(self.make_textclip("T").mask)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\myporject\AI\MoneyPrinterTurbo\venv\Lib\site-packages\moviepy\video\tools\subtitles.py", line 58, in make_textclip
return TextClip(
^^^^^^^^^
File "", line 2, in init
File "C:\myporject\AI\MoneyPrinterTurbo\venv\Lib\site-packages\moviepy\decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
^^^^^^^^^^^^^^^^^^^
File "C:\myporject\AI\MoneyPrinterTurbo\venv\Lib\site-packages\moviepy\video\VideoClip.py", line 1272, in init
raise IOError(error)

这个问题怎么办

@KevinZhang19870314
Copy link
Collaborator

❓ImageMagick is not installed on your computer
#33

按照 示例配置 里面提供的 下载地址 ,安装 https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-29-Q16-x64-static.exe, 用静态库
不要安装在中文路径里面,避免出现一些无法预料的问题
#54 (comment)

如果是linux系统,可以手动安装,参考 https://cn.linux-console.net/?p=16978

@harry0703
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants