I'm using MoviePy which requires ImageMagick, but when I run my code I receive the following error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 1262, in __init__
subprocess_call(cmd, logger=None)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/moviepy/tools.py", line 43, in subprocess_call
raise IOError(err.decode("utf8"))
OSError: convert: label expected `@/var/folders/tw/25c_f4h57bs5hslr5vm1fns80000gq/T/tmpejmzojaq.txt' @ error/annotate.c/GetMultilineTypeMetrics/797.
convert: no images defined `PNG32:/var/folders/tw/25c_f4h57bs5hslr5vm1fns80000gq/T/tmp9y2p9b0s.png' @ error/convert.c/ConvertImageCommand/3342.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/hypnoticocelot/Downloads/python/tikgenrewrite/tikgen.py", line 366, in <module>
tikgen()
File "/Users/hypnoticocelot/Downloads/python/tikgenrewrite/tikgen.py", line 360, in tikgen
subText = TextClip(subText, font=fontFile, fontsize=75, color=fontColor, stroke_color=strokeColor, stroke_width=3).set_position(("center", 650)).set_duration(mainVideo.duration)
File "<decorator-gen-84>", line 2, in __init__
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/moviepy/decorators.py", line 89, in wrapper
return f(*new_a, **new_kw)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 1272, in __init__
raise IOError(error)
OSError: MoviePy Error: creation of None failed because of the following error:
convert: label expected `@/var/folders/tw/25c_f4h57bs5hslr5vm1fns80000gq/T/tmpejmzojaq.txt' @ error/annotate.c/GetMultilineTypeMetrics/797.
convert: no images defined `PNG32:/var/folders/tw/25c_f4h57bs5hslr5vm1fns80000gq/T/tmp9y2p9b0s.png' @ error/convert.c/ConvertImageCommand/3342.
.
.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.
I thought ImageMagick might not have been installed, but running brew install ImageMagick
, I'm already on the latest version and fully updated. I'm using a Mac, so I'm not sure if for some reason the path to the ImageMagick binary is somehow incorrect? But I don't see any way to fix this.