Skip to content

在pycharm中运行launch.py报错FileNotFoundError: [WinError 2] 系统找不到指定的文件。 #41

Closed

Description

@145319

在pycharm中运行launch.py报错FileNotFoundError: [WinError 2] 系统找不到指定的文件。
我是windwos10系统并且已经安装了ImageMagick-7.1.1-32-Q16-HDRI-x64-dll.exe文件,重启pycharm,依然是这个问题

Activity

  1. R1ckShi commented on May 13, 2024

    @R1ckShi
    Collaborator

    能否详细描述一下问题,是一运行launch.py就会报错还是界面已经出来了但是点击按钮会报错?
    以及是否配置了输出文件路径?

  2. 145319 commented on May 13, 2024

    @145319
    Author

    能否详细描述一下问题,是一运行launch.py就会报错还是界面已经出来了但是点击按钮会报错? 以及是否配置了输出文件路径?

    一运行就报这个错,根本起不起来。但是直接用窗口命令cmd,python funclip/launch.py可以运行,也可以浏览器访问端口显示界面,但是点裁剪+字幕按钮就会报同样的错误
    Uploading 微信截图_20240513140137.png…

  3. R1ckShi commented on May 13, 2024

    @R1ckShi
    Collaborator

    是需要在命令行中通过python指令运行的,windows下imagemagick的安装与环境变量的配置还没有能成功的方法,所以裁剪+字幕可能依然会遇到错误
    上面的截图看不到,可以直接复制报错信息

  4. 145319 commented on May 13, 2024

    @145319
    Author

    是需要在命令行中通过python指令运行的,windows下imagemagick的安装与环境变量的配置还没有能成功的方法,所以裁剪+字幕可能依然会遇到错误 上面的截图看不到,可以直接复制报错信息

    D:\conda\envs\funclip\python.exe D:\python-projects\FunClip\funclip\launch.py
    Notice: ffmpeg is not installed. torchaudio is used to load audio
    If you want to use ffmpeg backend to load audio, please install it by:
    sudo apt install ffmpeg # ubuntu
    # brew install ffmpeg # mac
    2024-05-13 10:20:55,543 - modelscope - INFO - PyTorch version 2.3.0 Found.
    2024-05-13 10:20:55,545 - modelscope - INFO - Loading ast index from d:\Users\SC20003197.cache\modelscope\ast_indexer
    2024-05-13 10:20:55,755 - modelscope - INFO - Loading done! Current index file version is 1.14.0, with md5 1648640505d7a22ec7b73aead5874ed2 and a total number of 976 components indexed
    2024-05-13 10:20:56,468 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
    2024-05-13 10:20:56,468 - modelscope - INFO - Use user-specified model revision: master
    ckpt: d:\Users\SC20003197.cache\modelscope\hub\iic\speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch\model.pt
    2024-05-13 10:21:23,584 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
    2024-05-13 10:21:23,584 - modelscope - INFO - Use user-specified model revision: master
    ckpt: d:\Users\SC20003197.cache\modelscope\hub\damo\speech_fsmn_vad_zh-cn-16k-common-pytorch\model.pt
    2024-05-13 10:21:24,905 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
    2024-05-13 10:21:24,906 - modelscope - INFO - Use user-specified model revision: master
    ckpt: d:\Users\SC20003197.cache\modelscope\hub\damo\punc_ct-transformer_zh-cn-common-vocab272727-pytorch\model.pt
    2024-05-13 10:21:30,117 - modelscope - WARNING - Using the master branch is fragile, please use it with caution!
    2024-05-13 10:21:30,118 - modelscope - INFO - Use user-specified model revision: master
    Detect model requirements, begin to install it: d:\Users\SC20003197.cache\modelscope\hub\damo\speech_campplus_sv_zh-cn_16k-common\requirements.txt
    Traceback (most recent call last):
    File "D:\conda\envs\funclip\lib\site-packages\funasr\utils\install_model_requirements.py", line 6, in install_requirements
    result = subprocess.run(
    File "D:\conda\envs\funclip\lib\subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
    File "D:\conda\envs\funclip\lib\subprocess.py", line 971, in init
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "D:\conda\envs\funclip\lib\subprocess.py", line 1456, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] 系统找不到指定的文件。

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "D:\python-projects\FunClip\funclip\launch.py", line 15, in
    funasr_model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
    File "D:\conda\envs\funclip\lib\site-packages\funasr\auto\auto_model.py", line 147, in init
    spk_model, spk_kwargs = self.build_model(**spk_kwargs)
    File "D:\conda\envs\funclip\lib\site-packages\funasr\auto\auto_model.py", line 168, in build_model
    kwargs = download_model(**kwargs)
    File "D:\conda\envs\funclip\lib\site-packages\funasr\download\download_from_hub.py", line 11, in download_model
    kwargs = download_from_ms(**kwargs)
    File "D:\conda\envs\funclip\lib\site-packages\funasr\download\download_from_hub.py", line 86, in download_from_ms
    install_requirements(requirements)
    File "D:\conda\envs\funclip\lib\site-packages\funasr\utils\install_model_requirements.py", line 22, in install_requirements
    result = subprocess.run(
    File "D:\conda\envs\funclip\lib\subprocess.py", line 503, in run
    with Popen(*popenargs, **kwargs) as process:
    File "D:\conda\envs\funclip\lib\subprocess.py", line 971, in init
    self._execute_child(args, executable, preexec_fn, close_fds,
    File "D:\conda\envs\funclip\lib\subprocess.py", line 1456, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] 系统找不到指定的文件。

    Process finished with exit code 1

  5. R1ckShi commented on May 13, 2024

    @R1ckShi
    Collaborator

    使用裁剪按钮能否进行没有字幕的裁剪?
    如果使用裁剪按钮没有问题,那么应该可以确定是imagemagick在windows环境上的问题

  6. 145319 commented on May 13, 2024

    @145319
    Author

    使用裁剪按钮能否进行没有字幕的裁剪? 如果使用裁剪按钮没有问题,那么应该可以确定是imagemagick在windows环境上的问题

    可以进行没有字幕的裁剪,这个没有问题。但是可以考虑替换掉imagemagick吗?或者兼容处理一下

  7. zzk2021 commented on May 14, 2024

    @zzk2021

    我也遇到了这个问题

  8. R1ckShi commented on May 14, 2024

    @R1ckShi
    Collaborator

    正在寻找windows下imagemagick的替代方案:)

  9. zzk2021 commented on May 14, 2024

    @zzk2021

    改下Lib\site-packages\moviepy\config_defaults.py 里IMAGEMAGICK_BINARY的路径就行了。改成imagemagick的exe路径

  10. R1ckShi commented on May 14, 2024

    @R1ckShi
    Collaborator

    改下Lib\site-packages\moviepy\config_defaults.py 里IMAGEMAGICK_BINARY的路径就行了。改成imagemagick的exe路径

    感谢反馈

  11. locked and limited conversation to collaborators on May 14, 2024
  12. converted this issue into a discussion #47 on May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions