Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 尝试添加文本剪辑时,使用Python/MoviePy获取有关ImageMagick的错误_Python 3.x_File_Video_Imagemagick_Moviepy - Fatal编程技术网

Python 3.x 尝试添加文本剪辑时,使用Python/MoviePy获取有关ImageMagick的错误

Python 3.x 尝试添加文本剪辑时,使用Python/MoviePy获取有关ImageMagick的错误,python-3.x,file,video,imagemagick,moviepy,Python 3.x,File,Video,Imagemagick,Moviepy,我正在使用python 3.8.5以及最新版本的imagemagick和moviepy 错误(vs代码): 如果您有任何帮助,我们将不胜感激,并将完整的代码解决。只需将magick.exe文件路径设置为default_config.py中的变量。您可以在moviepy文件夹中找到它。已解决。只需将magick.exe文件路径设置为default_config.py中的变量。您可以在moviepy文件夹中找到它。是否安装了ImageMagick 6或7?MoviePy可能需要IM 6,也可能需要I

我正在使用python 3.8.5以及最新版本的imagemagick和moviepy

错误(vs代码):


如果您有任何帮助,我们将不胜感激,并将完整的代码解决。只需将
magick.exe
文件路径设置为default_config.py中的变量。您可以在moviepy文件夹中找到它。

已解决。只需将
magick.exe
文件路径设置为default_config.py中的变量。您可以在moviepy文件夹中找到它。

是否安装了ImageMagick 6或7?MoviePy可能需要IM 6,也可能需要IM 7,但您安装的是错误的。在Windows上,要获得IM 6,我相信,您需要从安装窗口安装旧组件。我检查了,是IM 7。那么我需要im6吗?
@Eden Gibson
检查MoviePy的要求。但这似乎是可能的。您安装了ImageMagick 6或7吗?MoviePy可能需要IM 6,也可能需要IM 7,但您安装的是错误的。在Windows上,要获得IM 6,我相信,您需要从安装窗口安装旧组件。我检查了,是IM 7。那么我需要im6吗?
@Eden Gibson
检查MoviePy的要求。但这似乎是有可能的。你指的是哪个默认配置?您能通过显示添加的代码行提供完整的解决方案吗?您指的是哪个默认的_config.py?您能否通过显示添加的代码行来提供完整的解决方案?
Traceback (most recent call last):
  File "C:\Users\edgib102\AppData\Local\Programs\Python\Python38-32\lib\site-packages\moviepy\video\VideoClip.py", line 1137, in __init__
    subprocess_call(cmd, logger=None)
  File "C:\Users\edgib102\AppData\Local\Programs\Python\Python38-32\lib\site-packages\moviepy\tools.py", line 46, in subprocess_call     
    proc = sp.Popen(cmd, **popen_params)
  File "C:\Users\edgib102\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\edgib102\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:/Users/edgib102/source/repos/Reddit-tts-video/Python/GetComments.py", line 40, in <module>
    TextClip = TextClip('TextTxt', fontsize=100, color = 'white')
  File "C:\Users\edgib102\AppData\Local\Programs\Python\Python38-32\lib\site-packages\moviepy\video\VideoClip.py", line 1146, in __init__
    raise IOError(error)
OSError: MoviePy Error: creation of None failed because of the following error:

[WinError 2] The system cannot find the file specified.

.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
TextClip = TextClip('TextTxt', fontsize=100, color = 'white')
TextClip = TextClip.set_position('center').set_duration(10)