Calling subprocess Popen, call, or check_output while running a python windows exe created with pyinstaller --noconsole results in an error with the following stack:
...
File "subprocess.py", line 566, in check_output
File "subprocess.py", line 702, in __init__
File "subprocess.py", line 823, in _get_handles
WindowsError: [Error 6] The handle is invalid
Came across this issue but no direct answer, so creating this post to hopefully make the solution easier to find.