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 Binary Not Found #2167

Open
TheCaptainCodes opened this issue Apr 28, 2024 · 3 comments
Open

ImageMagick Binary Not Found #2167

TheCaptainCodes opened this issue Apr 28, 2024 · 3 comments

Comments

@TheCaptainCodes
Copy link

          ### **What to do for windows?**

I have even changed the file path in config_details.py
IMAGEMAGICK_BINARY = os.getenv('IMAGEMAGICK_BINARY', 'C:\Program Files\ImageMagick-7.1.1-31-Q16\magick.exe')

I even tried:
from moviepy.config import change_settings
change_settings({"IMAGEMAGICK_BINARY": r"C:\Program Files\ImageMagick\\convert.exe"})

What to do now? I get the same error every time:

Traceback (most recent call last):
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\video\VideoClip.py", line 1137, in init
subprocess_call(cmd, logger=None)
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\tools.py", line 54, in subprocess_call
raise IOError(err.decode('utf8'))
OSError: magick.exe: label expected `@C:\Users\LENOVO\AppData\Local\Temp\tmpusxywjtr.txt' @ error/annotate.c/GetMultilineTypeMetrics/804.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:\Fatin\autoyt_vidmaker\main.py", line 31, in
makeFinalVideo(story, "./assets/temp/mp3/text_audio.mp3", "./assets/temp/images/antique shop.png", "./assets/temp/video/final_video.mp4")
File "F:\Fatin\autoyt_vidmaker\final_video.py", line 14, in makeFinalVideo
captions_clip = VideoClip(make_frame, duration=len(words))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\video\VideoClip.py", line 86, in init
self.size = self.get_frame(0).shape[:2][::-1]
^^^^^^^^^^^^^^^^^
File "", line 2, in get_frame
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\Lib\site-packages\moviepy\Clip.py", line 93, in get_frame
return self.make_frame(t)
^^^^^^^^^^^^^^^^^^
File "F:\Fatin\autoyt_vidmaker\final_video.py", line 12, in make_frame
return TextClip(caption, fontsize=24, color='white').set_pos('center').set_duration(1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python311\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:

magick.exe: label expected `@C:\Users\LENOVO\AppData\Local\Temp\tmpusxywjtr.txt' @ error/annotate.c/GetMultilineTypeMetrics/804.
.

.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

Originally posted by @TheCaptainCodes in #1966 (comment)

@arielomdotcom
Copy link

Please provide the module Version, python version, etc.

@TheCaptainCodes
Copy link
Author

Please provide the module Version, python version, etc.

Everything's up-to-date

@ruangustavo
Copy link

Can you check if you have convert.exe installed?

I was experiencing the same problem, but I noticed that in the latest versions of ImageMagick convert.exe is deprecated and not installed by default

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

4 participants
@ruangustavo @TheCaptainCodes @arielomdotcom and others