Issue 29938: subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE (original) (raw)

print(subprocess.run("bash -c ls", shell=True, stdout=subprocess.PIPE, encoding='utf_16_le').stdout)

错误: 0x80070057

error: 0x80070057

And the returncode is 4294967295.

OS: Simp-Chinese Win10; Bash on Windows(Ubuntu 14.04 LTS). Python 3.5 and Python 3.6 produce the same issue.

While not capture stdout, the command works just fine and output the result onto screen.