Visual Studio Code中的Python获取winError [5]拒绝来自表意文字的访问

这是我第一次在这里发帖,因此对于此问题的格式不正确,我深表歉意。 我安装了VSC以在开发STM32代码中使用它。我在github中找到了damongranlabs的意念,对您有很大帮助。运行update.py脚本时,我拒绝了winError [5]访问。 VSC使用powershell作为终端,我正在运行Windows 10和Python 3.8 32bit。

我曾尝试以管理员身份运行VSC,但没有运气。

以下是我尝试运行脚本后在Powershell中得到的内容:

Windows PowerShell
Copyright (C) microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS D:\Development\STM32\cubemxprojects\476EncTest> &  d:/Development/STM32/cubemxprojects/476EncTest/ideScripts/update.py
Update started.

Existing '.vscode' folder used.
One STM32CubeMX file found: 476EncTest.ioc
Existing 'Makefile' file found (restored from '.backup').
Copy of file (new name: Makefile): D:/Development/STM32/cubemxprojects/476EncTest/Makefile.backup
Makefile 'print-variable' function added.
Valid 'buildData.json' file found.
Valid 'toolsPaths.json' file found.
'toolsPaths.json' file updated!

        Enter path(s) to OpenOCD configuration file(s):
                Example: 'target/stm32f0x.cfg'. Absolute or relative to OpenOCD /scripts/ folder.
                If more than one file is needed,separate with comma.
                Paste here and press Enter: C:\Users\omis2\AppData\Roaming\GNUMCUeclipse\GNU MCU eclipse\OpenOCD\0.10.0-12-20190422-2015\scripts\target\stm32l4x.cfg

        Enter path or command for 'stm32SvdPath':
        Paste here and press Enter: C:\Users\omis2\AppData\Roaming\GNUMCUeclipse\Keil.STM32L4xx_DFP.2.2.0\CMSIS\SVD\STM32L4x6.svd

ERROR (55 seconds).
Unexpected error occured during 'Update' procedure. Exception:
Traceback (most recent call last):
  File "D:\Development\STM32\cubemxprojects\476EncTest\ideScripts\update.py",line 56,in <module>
    makefileData = makefile.getMakefileData(makeExePath,gccExePath)
  File "D:\Development\STM32\cubemxprojects\476EncTest\ideScripts\updateMakefile.py",line 93,in getMakefileData
    projectName = self.getMakefileVariable(makeExePath,gccExePath,self.mkfStr.projectName)[0]
  File "   D:\Development\STM32\cubemxprojects\476EncTest\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

感谢您的帮助

coldboyjack 回答:Visual Studio Code中的Python获取winError [5]拒绝来自表意文字的访问

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3131721.html

大家都在问