Closed wangwenqiao666 closed 7 months ago
你这个不是网络问题,是 pexels_api_key 估计填错了 使用正确的key,再试试看
你这个不是网络问题,是 pexels_api_key 估计填错了 使用正确的key,再试试看
我用的moonshot的key,是对的,能自动搜集题目生成文案和关键词:
我不是指 moonshot 的key,是 pexels_api_keys
估计填错了。看你的日志,报错 401
(认证失败)
谢谢,确实是我pexels_api_keys填错了,但是又出现新的问题了:
Traceback (most recent call last):
File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 1262, in init
subprocess_call(cmd, logger=None)
File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/tools.py", line 43, in subprocess_call
raise IOError(err.decode("utf8"))
OSError: convert-im6.q16: attempt to perform an operation not allowed by the security policy @/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.png' @ error/convert.c/ConvertImageCommand/3258.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
exec(code, module.dict)
File "/data/MoneyPrinterTurbo/webui/Main.py", line 247, in
convert-im6.q16: attempt to perform an operation not allowed by the security policy @/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.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. Check the documentation.
可是我已经安装过了ImageMagick
你直接执行
convert --version
应该要看到类似输出,就对了
Version: ImageMagick 7.1.1-29 Q16-HDRI aarch64 21991 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0)
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib zstd
Compiler: gcc (4.2)
或者你可以指定 ImageMagick 可执行程序的路径,自己按实际情况改下 imagemagick_path
#
# ImageMagick
#
# Once you have installed it, ImageMagick will be automatically detected, except on Windows!
# On Windows, for example "C:\Program Files (x86)\ImageMagick-7.1.1-Q16-HDRI\magick.exe"
# Download from https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-29-Q16-x64-static.exe
# imagemagick_path = "C:\\Program Files (x86)\\ImageMagick-7.1.1-Q16\\magick.exe"
你直接执行
convert --version
应该要看到类似输出,就对了
Version: ImageMagick 7.1.1-29 Q16-HDRI aarch64 21991 https://imagemagick.org Copyright: (C) 1999 ImageMagick Studio LLC License: https://imagemagick.org/script/license.php Features: Cipher DPC HDRI Modules OpenMP(5.0) Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png ps raw tiff webp xml zlib zstd Compiler: gcc (4.2)
我的我的是有的。 我的是Linux系统,也可以自己指定imagemagick_path路径吗?
谢谢,确实是我pexels_api_keys填错了,但是又出现新的问题了:
Traceback (most recent call last): File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 1262, in init subprocess_call(cmd, logger=None) File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/tools.py", line 43, in subprocess_call raise IOError(err.decode("utf8")) OSError: convert-im6.q16: attempt to perform an operation not allowed by the security policy
@/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.png' @ error/convert.c/ConvertImageCommand/3258.During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script exec(code, module.dict) File "/data/MoneyPrinterTurbo/webui/Main.py", line 247, in tm.start(task_id=task_id, params=cfg) File "/data/MoneyPrinterTurbo/app/services/task.py", line 151, in start video.generate_video(video_path=combined_video_path, File "/data/MoneyPrinterTurbo/app/services/video.py", line 214, in generate_video sub = SubtitlesClip(subtitles=subtitle_path, make_textclip=generator, encoding='utf-8') File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/video/tools/subtitles.py", line 104, in init hasmask = bool(self.make_textclip("T").mask) File "/data/MoneyPrinterTurbo/app/services/video.py", line 197, in generator clip = TextClip( File "", line 2, in init File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/decorators.py", line 89, in wrapper return f(*new_a, new_kw) File "/data/MoneyPrinterTurbo/venv/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-im6.q16: attempt to perform an operation not allowed by the security policy
@/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.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. Check the documentation.
可以尝试修改/etc/ImageMagick-x/下的policy.xml,将
谢谢,确实是我pexels_api_keys填错了,但是又出现新的问题了: Traceback (most recent call last): File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/video/VideoClip.py", line 1262, in init subprocess_call(cmd, logger=None) File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/tools.py", line 43, in subprocess_call raise IOError(err.decode("utf8")) OSError: convert-im6.q16: attempt to perform an operation not allowed by the security policy
@/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.png' @ error/convert.c/ConvertImageCommand/3258. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script exec(code, module.dict) File "/data/MoneyPrinterTurbo/webui/Main.py", line 247, in tm.start(task_id=task_id, params=cfg) File "/data/MoneyPrinterTurbo/app/services/task.py", line 151, in start video.generate_video(video_path=combined_video_path, File "/data/MoneyPrinterTurbo/app/services/video.py", line 214, in generate_video sub = SubtitlesClip(subtitles=subtitle_path, make_textclip=generator, encoding='utf-8') File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/video/tools/subtitles.py", line 104, in init hasmask = bool(self.make_textclip("T").mask) File "/data/MoneyPrinterTurbo/app/services/video.py", line 197, in generator clip = TextClip( File "", line 2, in init File "/data/MoneyPrinterTurbo/venv/lib/python3.10/site-packages/moviepy/decorators.py", line 89, in wrapper return f(*new_a, new_kw) File "/data/MoneyPrinterTurbo/venv/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-im6.q16: attempt to perform an operation not allowed by the security policy@/tmp/tmp_r82pwab.txt' @ error/property.c/InterpretImageProperties/3668. convert-im6.q16: no images defined
PNG32:/tmp/tmp4q65azfi.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. Check the documentation.可以尝试修改/etc/ImageMagick-x/下的policy.xml,将 注释
将哪个注释解开吗?
@wangwenqiao666 是的,Linux下面也可以设置 imagemagick_path
,但是你既然可以直接执行 convert 命令,说明 imagemagick 是可以被检测到的。
你试试 @zhanglexx 的方法看看行不行
也有可能是,你需要安装 静态库
版本的 imagemagick
我在 windows
里面也是遇到和你这个一模一样的问题,后来安装 静态库版本的,就OK了
@wangwenqiao666 是的,Linux下面也可以设置
imagemagick_path
,但是你既然可以直接执行 convert 命令,说明 imagemagick 是可以被检测到的。 你试试 @zhanglexx 的方法看看行不行也有可能是,你需要安装
静态库
版本的 imagemagick 我在windows
里面也是遇到和你这个一模一样的问题,后来安装 静态库版本的,就OK了
可以了,我手动安装就好了,https://cn.linux-console.net/?p=16978 按照这个操作的
我用的是没有显示器的Linux系统,没有VPN,连接不了外网,下不了视频,应该怎么办?