return getattr(_subprocess, original_name)(app_name, patch_arg_str_win(cmd_line), *args) PermissionError: [WinError 5] Access is denied

  access-denied, conda, permissions, python, windows
import moviepy.editor as mp

    my_clip = mp.VideoFileClip(r"" +"C:sample111.mp4")
    my_clip.audio.write_audiofile(r"" + audio_full_path)

Error:

 self._target(*self._args, **self._kwargs)
  File "C:UsersUserDesktopnewResearch21-064functionsqatranscribeHandler.py", line 19, in audioConvertFunc
    success = videoToAudioConverter(utils.constants.new_video_import_path, current_time)
  File "C:UsersUserDesktopnewResearch21-064utilsconvertersvideoToAudioConverter.py", line 13, in videoToAudioConverter
    my_clip = mp.VideoFileClip(r"" +"C:sample111.mp4")
  File "C:UsersUserAppDataRoamingPythonPython38site-packagesmoviepyvideoioVideoFileClip.py", line 88, in __init__
    self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt,
  File "C:UsersUserAppDataRoamingPythonPython38site-packagesmoviepyvideoioffmpeg_reader.py", line 35, in __init__
    infos = ffmpeg_parse_infos(filename, print_infos, check_duration,
  File "C:UsersUserAppDataRoamingPythonPython38site-packagesmoviepyvideoioffmpeg_reader.py", line 257, in ffmpeg_parse_infos
    proc = sp.Popen(cmd, **popen_params)
  File "C:UsersUseranaconda3envsSLIIT-2021-064libsubprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:UsersUseranaconda3envsSLIIT-2021-064libsubprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
  File "C:Program FilesJetBrainsPyCharm 2020.1pluginspythonhelperspydev_pydev_bundlepydev_monkey.py", line 551, in new_CreateProcess
    return getattr(_subprocess, original_name)(app_name, patch_arg_str_win(cmd_line), *args)
PermissionError: [WinError 5] Access is denied

In mp.VideoFileClip("tempStorage/importVideo/111.mp4") I read the video file from storage and then in next line it convert to audio.
The following error occurred at the above 1st line.

This code worked perfectly for a long time and suddenly above error occurs. When I check the program in another pc, it works fine. There is no issue in the code. The problem is something related to the permissions in windows 10 in my machine. I’m using administrative account in windows. Pycharm runs on administrative mode as well. I tried to run it through command prompt in administrative mode as well, but same error occurred.

I’m using Windows 10 pro 21H1 19043.1151

Please help!!

Source: Windows Questions

LEAVE A COMMENT