harry0703 / MoneyPrinterTurbo

利用AI大模型,一键生成高清短视频 Generate short videos with one click using AI LLM.
MIT License
14.79k stars 2.27k forks source link

请问下linux 包含imagemagick文件的policy.xml全部修改后,还是找不到imagemagick #418

Closed alexa1109 closed 1 week ago

alexa1109 commented 3 weeks ago

这是报错信息 `OSError: MoviePy Error: creation of None failed because of the following error:

WARNING: The convert command is deprecated in IMv7, use "magick" instead of "convert" or "magick convert"

convert: unable to read font Georgia-Bold' @ warning/annotate.c/RenderType/1024. convert: delegate library support not built-in '/usr/share/fonts/type1/gsfonts/n019003l.pfb' (Freetype) @ warning/annotate.c/RenderFreetype/2112. convert: no decode delegate for this image format' @ error/constitute.c/ReadImage/746. convert: no images defined `PNG32:/tmp/tmp0xuf3v7x.png' @ error/deprecate.c/ConvertImageCommand/3368. .

.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.`

这是修改后的 `

` 修改了ImageMagick-7 和 ImageMagick-6下的文件policy.xml还是报错,在config.toml配置文件改了imagemagick_path = "/etc/ImageMagick-6",或是ImageMagick-7都一样

alexa1109 commented 3 weeks ago
<!-- use curl -->
<policy domain="delegate" rights="none" pattern="URL" />
<policy domain="delegate" rights="none" pattern="HTTPS" />
<policy domain="delegate" rights="none" pattern="HTTP" />
<!-- in order to avoid to get image with password text -->
<policy domain="path" rights="read|write" pattern="@*"/>
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />

这是修改后的

dxmxyx commented 3 weeks ago

我也遇到了相同的错误

harry0703 commented 3 weeks ago

请问是ubuntu系统吗?

alexa1109 commented 3 weeks ago

请问是ubuntu系统吗?

是的 ubuntu22.04

harry0703 commented 3 weeks ago

参考这个 https://github.com/harry0703/MoneyPrinterTurbo/issues/73 直接apt安装试试

alexa1109 commented 2 weeks ago

参考这个 #73 直接apt安装试试

使用apt 安装还是不行报的同样的错误

PeterYoungQaQ commented 2 weeks ago

参考这个 #73 直接apt安装试试

使用apt 安装还是不行报的同样的错误

起一个新的环境,不用编译的,直接apt安装 apt install imagemagick libfreetype6-dev 然后 convert -list configure 确保DELEGATES这一栏有fontconfig freetype这两个

alexa1109 commented 1 week ago

参考这个 #73 直接apt安装试试

使用apt 安装还是不行报的同样的错误

起一个新的环境,不用编译的,直接apt安装 apt install imagemagick libfreetype6-dev 然后 convert -list configure 确保DELEGATES这一栏有fontconfig freetype这两个

` Name Value

CC gcc CFLAGS -fopenmp -Wall -g -O2 -mtune=haswell -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 CHANNEL_MASK_DEPTH 32 CODER_PATH /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/coders CONFIGURE ./configure CONFIGURE_PATH /usr/local/etc/ImageMagick-7/ COPYRIGHT Copyright (C) 1999 ImageMagick Studio LLC CPPFLAGS -I/usr/local/include/ImageMagick-7 CXX g++ CXXFLAGS -g -O2 -pthread DEFS -DHAVE_CONFIG_H DELEGATES jbig jpeg ps x fontconfig freetype DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-dps=no --with-fftw=no --with-flif=no --with-fpx=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-uhdr=no --with-wmf=no --with-perl=no DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-7 EXEC-PREFIX /usr/local EXECUTABLE_PATH /usr/local/bin FEATURES Channel-masks(32-bit) Cipher DPC HDRI OpenMP FILTER_PATH /usr/local/lib/ImageMagick-7.1.1/modules-Q16HDRI/filters GIT_REVISION 21316 HOST x86_64-pc-linux-gnu INCLUDE_PATH /usr/local/include/ImageMagick-7 LDFLAGS -L/usr/local/lib LIB_VERSION 0x711 LIB_VERSION_NUMBER 7,1,1,34 LIBRARY_PATH /usr/local/lib/ImageMagick-7.1.1 LIBS -ljbig -ljpeg -lX11 -lm -lpthread -lgomp NAME ImageMagick PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 PREFIX /usr/local QuantumDepth 16 RELEASE_DATE 2024-06-10 SECURITY_POLICY open SHARE_PATH /usr/local/share/ImageMagick-7 SHAREARCH_PATH /usr/local/lib/ImageMagick-7.1.1/config-Q16HDRI TARGET_CPU x86_64 TARGET_OS linux-gnu TARGET_VENDOR pc VERSION 7.1.1 WEBSITE https://imagemagick.org

Path: [built-in]

Name Value

DELEGATES jbig jpeg x FEATURES Cipher DPC HDRI OpenMP(4.5) MAGICK_TEMPORARY_PATH /tmp NAME ImageMagick QuantumDepth Q16 ` 用conda新建的环境,修改了上面的config文件 delegates 里面新增fontconfig freetype 这2个 还是出这个问题