pywintypes.error: (2, 'CreateProcess', 'The system cannot find the file specified.')
Hi, I'm trying to run the the code:
import sys
if 'linux' in sys.platform:
my_os = 'linux'
import pexpect
elif 'win' in sys.platform:
my_os = 'win'
import winpexpect
if my_os == 'win':
command = 'qemu-system-arm -machine .........'
session = winpexpect.winspawn(command)
And I'm obtaining the following error:
Traceback (most recent call last):
File "xxxxx.py", line 13, in
self._spawn (command, args)
File "yyyyy\lib\site-packages\winpexpect.py", line 399, in _spawn
res = CreateProcess(python, pyargs, None, None, False,
pywintypes.error: (2, 'CreateProcess', 'The system cannot find the file specified.')
How can I solve this? @geertj @wamcvey
I've already tried referencing the executable multiple ways:
- 'C:\Program Files\qemu\qemu-system-arm.exe'
- 'C:\\Program Files\\qemu\\qemu-system-arm.exe'
- r'C:\Program Files\qemu\qemu-system-arm.exe'
- r'C:\\Program Files\\qemu\\qemu-system-arm.exe'
- ...
And even replacing it with cmd.exe
Nothing changes