Python Forum

Full Version: subprocess.Popen() suddenly giving me grief?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>python3
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import subprocess
>>> subprocess.Popen(['Z:/depot/kJams/Scripting/AutoPin.exe', 'parameter'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 50] The request is not supported


this was working recently. this is on Windows 10 with all latest OS updates

problem may have started after recent OS update?

[attachment=2682]
Try to launch the program from a command line in a terminal, not from Python, to see if it works as expected.
it does not work in terminal either.
note that it is on a network mapped drive, but that should not affect things, especially because i explicitly allowed that intratnet zone
when i move the AutoPin.exe to an internal drive, it DOES work. so it has something to do with the fact that it's on a network-mapped drive. but see my screen shot where you can see that i EXPLICITLY allow running apps from that drive