moviepy: Unable to run the sample code! Getting errors. Plase Help
Hi there, I tried to run the sample/example code for the moviePy but I’m getting this error. I don’t know how to resolve. I’m an novice in the field so don’t have an experience like you guys.
from moviepy.editor import *
clip = VideoFileClip("myHolidays.mp4").subclip(5,15)
clip = clip.volumex(0.8)
txt_clip = TextClip("My Holidays 2013",fontsize=70,color='white')
txt_clip = txt_clip.set_pos('center').set_duration(10)
video = CompositeVideoClip([clip, txt_clip])
video.write_videofile("myHolidays_edited.avi")
Error message:
[MoviePy] This command returned an error !
Traceback (most recent call last):
File "/home/pi/clip_example.py", line 11, in <module>
txt_clip = TextClip("My Holidays 2013",fontsize=70,color='white')
File "/usr/local/lib/python2.7/dist-packages/moviepy/video/VideoClip.py", line 1173, in __init__
raise IOError(error)
IOError: MoviePy Error: creation of None failed because of the following error:
convert: not authorized `@/tmp/tmpIJUQvL.txt' @ error/property.c/InterpretImageProperties/3405.
convert: no images defined `PNG32:/tmp/tmpt9CCfR.png' @ error/convert.c/ConvertImageCommand/3210.
.
.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
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 16 (1 by maintainers)
Commits related to this issue
- Merge pull request #403 from earney/master fix issue #401 — committed to Zulko/moviepy by deleted user 7 years ago
- Update (#3) * Fixed copy-paste typo Changed documentation for the color parameter to distinguish from bg_color * Fixed missing list (using python 3) * fixed module hierarchy for Trajector... — committed to tburrows13/moviepy by deleted user 7 years ago
- Update Gloin (#4) * Fixed copy-paste typo Changed documentation for the color parameter to distinguish from bg_color * Fixed missing list (using python 3) * fixed module hierarchy for Tra... — committed to tburrows13/moviepy by deleted user 7 years ago
- `Colorclip` changed `col`>`color` (#424) * Changed the `col` paramater of `ColorClip` to `color` and added a DeprecationWarning if the users tries to use `col` * Update VideoFileClip.py * Added... — committed to Zulko/moviepy by deleted user 7 years ago
I just figured this out… imagemagick (ie, convert) has a policy.xml file that stops you from accessing any resource that starts with ‘@’.
type
identify -list policy
the first line should tell you where your policy.xml file is located. My policy.xml file is lcoated at /etc/ImageMagick-6/policy.xmlopen that file, and goto to the end and comment out (or remove the line that reads)
since this is xml, you can comment out this line by appending the line with
<!--
and ending it with-->
Hope this helps!
What @earney mentioned works perfectly, Just to add some details for mac Sierra users the
policy.xml
will be at somewhere like this/usr/local/Cellar/imagemagick/7.0.8-11_1/etc/ImageMagick-7/policy.xml
and if you dont find imagemagic in/usr/local/Cellar/
try https://github.com/Zulko/moviepy/issues/347