Python в Visual Studio Code получает winError [5] Доступ запрещен для idescripts - PullRequest
0 голосов
/ 09 ноября 2019

я впервые пишу здесь, поэтому я прошу прощения, если этот вопрос не отформатирован правильно. Я установил 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

Спасибо за любую помощь

...