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

运行imagemagick_test.py报错,FileNotFoundError: [WinError 2] 系统找不到指定的文件 #27

Closed
OneMobPsycho100 opened this issue Apr 24, 2024 · 1 comment

Comments

@OneMobPsycho100
Copy link

PS D:\model\FunClip-main\funclip> ..\runtime\python.exe .\imagemagick_test.py
Traceback (most recent call last):
File "D:\model\FunClip-main\runtime\lib\site-packages\moviepy\video\VideoClip.py", line 1137, in init
subprocess_call(cmd, logger=None)
File "D:\model\FunClip-main\runtime\lib\site-packages\moviepy\tools.py", line 46, in subprocess_call
proc = sp.Popen(cmd, **popen_params)
File "D:\model\FunClip-main\runtime\lib\subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\model\FunClip-main\runtime\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\model\FunClip-main\funclip\imagemagick_test.py", line 10, in
subtitles = SubtitlesClip(subs, generator)
File "D:\model\FunClip-main\runtime\lib\site-packages\moviepy\video\tools\subtitles.py", line 86, in init
hasmask = bool(self.make_textclip('T').mask)
File "D:\model\FunClip-main\funclip\imagemagick_test.py", line 4, in
generator = lambda txt: TextClip(txt, font='./font/STHeitiMedium.ttc', fontsize=48, color='white')
File "D:\model\FunClip-main\runtime\lib\site-packages\moviepy\video\VideoClip.py", line 1146, in init
raise IOError(error)
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 in file conf.py, or that the path you specified is incorrect

ImageMagick确实是已经安装了, 字体文件也在那个目录,还有其它原因会导致这个问题么?
PS D:\model\FunClip-main\funclip> magick --version
Version: ImageMagick 7.1.1-29 Q16-HDRI x64 0deac72:20240225 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Channel-masks(64-bit) Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg jxl lcms lqr lzma openexr pangocairo png ps raqm raw rsvg tiff webp xml zip zlib

@R1ckShi
Copy link
Collaborator

R1ckShi commented Apr 25, 2024

应该是没有把ImageMagick的bin加到win的path里面

“.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 in file conf.py, or that the path you specified is incorrect”

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

2 participants