harry0703 / MoneyPrinterTurbo

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

No such file or directory: 'unset' #2

Closed hochonin93 closed 4 months ago

hochonin93 commented 4 months ago
Traceback (most recent call last):
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/venv/lib/python3.11/site-packages/moviepy/video/VideoClip.py", line 1137, in __init__
    subprocess_call(cmd, logger=None)
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/venv/lib/python3.11/site-packages/moviepy/tools.py", line 46, in subprocess_call
    proc = sp.Popen(cmd, **popen_params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'unset'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 542, in _run_script
    exec(code, module.__dict__)
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/webui/Main.py", line 153, in <module>
    tm.start(task_id=task_id, params=cfg)
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/app/services/task.py", line 93, in start
    video.generate_video(video_path=combined_video_path,
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/app/services/video.py", line 186, in generate_video
    subtitles = SubtitlesClip(subtitle_path, generator)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/venv/lib/python3.11/site-packages/moviepy/video/tools/subtitles.py", line 86, in __init__
    hasmask = bool(self.make_textclip('T').mask)
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/app/services/video.py", line 165, in generator
    return TextClip(
           ^^^^^^^^^
  File "/Users/hochonin/Documents/test/MoneyPrinterTurbo/venv/lib/python3.11/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:

[Errno 2] No such file or directory: 'unset'.

.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

environment:MacBook M2 python 3.11

harry0703 commented 4 months ago

安装一下 ImageMagick

brew install 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)