stefanopini/simple-HRNet

FileNotFoundError: [WinError 2] The system cannot find the specified file

fxyQAQ opened this issue · 7 comments

when I run python scripts/extract-keypoints.py --filename test1.mp4 --format csv,

Traceback (most recent call last):
File "F:\Anaconda3\envs\pytorch18\lib\subprocess.py", line 800, in init
restore_signals, start_new_session)
File "F:\Anaconda3\envs\pytorch18\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
File "F:\Program Files\PyCharm 2021.1.2\plugins\python\helpers\pydev_pydev_bundle\pydev_monkey.py", line 575, in new_CreateProcess
return getattr(_subprocess, original_name)(app_name, patch_arg_str_win(cmd_line), *args)
FileNotFoundError: [WinError 2] The system cannot find the specified file

So what's the problem?
Thanks

Hi, it looks like the file test1.mp4 or a python library is not found.
Have you double checked that the name and location of the file test1.mp4?
Does the script work using a webcam as input source?

Hello.
I have same problem.

When I run python scripts/live-demo.py --filename input.mp4 ,
occurred same problem.
FileNotFoundError: [WinError 2] The system cannot find the specified file

The name and location of the file is correct.

When the script work using a webcam as input source, it worked correctly.

I couldn't solve this problem.

Hi;
I have the same problem too.
FileNotFoundError: [WinError 2] The system cannot find the file specified

Hi @nakano-texnos (sorry for the late reply) and @alimsvn ,
I tried again and I'm still not able to reproduce the issue on my machines, but I have some suspects (i.e. vidgear and ffmpeg).

Could you please provide the following information?

  • OS (windows / macos / linux distribution)
  • ffmpeg version
  • opencv and vidgear version
  • does the script work using the option --disable_vidgear?
  • does the script work replacing line 35 with rotation_code = None?
    rotation_code = check_video_rotation(filename)

Hi, @stefanopini
Thank you for your reply.

  • OS: Windows10 Pro
  • ffmpeg: 1.4
  • ffmpeg-python: 0.2.0
  • opencv-python: 4.5.3.56
  • vidgear: 0.2.2
  • does the script work using the option --disable_vidgear?: NO, same FileNotFoundError
  • does the script work replacing line 35 with rotation_code = None?: It Works correctly!

The script worked correctly by replacing line 35 with rotation_code = None.
Thank you for your help!

I had the same issue before.
I solved it in this way.
If you're working in an anaconda environment,

conda install -c conda-forge ffmpeg-python

I hope you try reinstalling it through.

ffmpeg = 4.3.1
ffmpeg-python = 0.2.0
python = 3.7
It was conducted in a window 10 pro environment.

Thank you all for reporting the issue and the solutions that worked for you!
I will close the issue given it is likely related to the installation of ffmpeg/ffprobe.

For anyone arriving here, working solutions are:

  • verifying/reinstalling ffmpeg and ffmpeg-python
  • removing the usage of ffmpeg/ffprobe replacing line 35 with rotation_code = None in
    rotation_code = check_video_rotation(filename)