Python Forum
Has anyone experience a winError[5] Access Denied in Windows 10?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Has anyone experience a winError[5] Access Denied in Windows 10?
#1
Hello, I am running a script that turns into an error when running one of the built in scripts in Python (subprocess.py). The error appears to be Windows related but I am not sure. I was wondering if anyone had experience this error and could point me to a potential solution. I am running this script from VSC (Visual Studio Code) using Python3 in powershell. The following is my traceback:

Error:
[i]ERROR (78 seconds). Unexpected error occured during 'Update' procedure. Exception: Traceback (most recent call last): File "c:/TouchGFXProjects/769_try/ideScripts/update.py", line 56, in <module> makefileData = makefile.getMakefileData(makeExePath, gccExePath) File "c:\TouchGFXProjects\769_try\ideScripts\updateMakefile.py", line 93, in getMakefileData projectName = self.getMakefileVariable(makeExePath, gccExePath, self.mkfStr.projectName)[0] File "c:\TouchGFXProjects\769_try\ideScripts\updateMakefile.py", line 366, in getMakefileVariable proc = Popen(arguments, stdout=PIPE) File "C:\Users\omis2\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\omis2\AppData\Local\Programs\Python\Python38-32\lib\subprocess.py", line 1307, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, PermissionError: [WinError 5] Access is denied[/i]
I have tried changing my permissions to the C folder by setting myself as an admin to no avail. Note that the original script is in drive D while the python installation is in the c:\user\username\app data\programs\python path.

Thank you very much in advance for any help
Reply
#2
I'm not a Windows user but it would be a good idea to get the command that python tries to call by printing the arguments before the statement proc = Popen(arguments, stdout=PIPE) at line 366 in updateMakefile.py. If these arguments are for example ['spam.exe', '-s', 'eggs', 'ham'] then you could
  • check that the program can access spam.exe (permissions)
  • try the command spam.exe -s eggs ham in a terminal (cmd window) to see if it runs correctly.
Reply
#3
(Nov-11-2019, 07:10 AM)Gribouillis Wrote: I'm not a Windows user but it would be a good idea to get the command that python tries to call by printing the arguments before the statement proc = Popen(arguments, stdout=PIPE) at line 366 in updateMakefile.py. If these arguments are for example ['spam.exe', '-s', 'eggs', 'ham'] then you could
  • check that the program can access spam.exe (permissions)
  • try the command spam.exe -s eggs ham in a terminal (cmd window) to see if it runs correctly.

Thanks very much for the response. I will be looking into it.

regards,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  FileNotFoundError: [WinError 2] The system cannot find the file specified NewBiee 2 1,493 Jul-31-2023, 11:42 AM
Last Post: deanhystad
  The INSERT permission was denied on the object Steven5055 2 1,417 Feb-25-2023, 11:37 PM
Last Post: Steven5055
  access is denied error 5 for network drive mapping ? ahmedbarbary 2 1,731 Aug-17-2022, 10:09 PM
Last Post: ahmedbarbary
  Server Folder Error : WinError5 Access Denied fioranosnake 1 1,092 Jun-21-2022, 11:11 PM
Last Post: Larz60+
  WinError 2, since fresh new Windows 10 install alok 1 1,611 Jan-06-2022, 11:20 PM
Last Post: lucasbazan
  Error no 13: Permission denied in python shantanu97 1 6,095 Mar-31-2021, 02:15 PM
Last Post: snippsat
  pyarrow throws oserror winerror 193 1 is not a valid win32 application aupres 2 3,722 Oct-21-2020, 01:04 AM
Last Post: aupres
  Access denied not able to do anything 8( What do i do? MurphysLaw 3 3,696 Oct-20-2020, 08:16 AM
Last Post: snippsat
  Need to access Windows Machine or Personal Certificate Store and send to web app seswho 0 1,607 Sep-14-2020, 04:57 PM
Last Post: seswho
  os.remove() Access is denied pythonnewbie138 3 30,460 Aug-28-2020, 10:02 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020