美文网首页
ubuntu 运行 MoviePy 错误 ImageMagic

ubuntu 运行 MoviePy 错误 ImageMagic

作者: spyder_men | 来源:发表于2019-11-24 21:54 被阅读0次

    1.错误信息

    By default, the image format of `file' is determined by its magic
    number.  To specify a particular image format, precede the filename
    with an image format name and a colon (i.e. ps:image) or specify the
    image type as the filename suffix (i.e. image.ps).  Specify 'file' as
    '-' for standard input or output.
    root@z:/mnt/hgfs/work/video# python change.py
    Traceback (most recent call last):
      File "change.py", line 4, 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 1177, in __init__
        raise IOError(error)
    IOError: MoviePy Error: creation of None failed because of the following error:
    
    convert-im6.q16: not authorized `@/tmp/tmpQzuwf5.txt' @ error/property.c/InterpretImageProperties/3516.
    convert-im6.q16: no images defined `PNG32:/tmp/tmpDI1fqf.png' @ error/convert.c/ConvertImageCommand/3258.
    .
    
    .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
    
    

    2.解决办法

    vi /etc/ImageMagick-6/policy.xml
    

    <policy domain="path" rights="none" pattern="@*" />
    

    替换成

    <!-- <policy domain="path" rights="none" pattern="@*" /> -->
    

    相关文章

      网友评论

          本文标题:ubuntu 运行 MoviePy 错误 ImageMagic

          本文链接:https://www.haomeiwen.com/subject/rrsrwctx.html