[New-bugs-announce] [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT

Joe Borg report at bugs.python.org
Tue Apr 30 12:38:56 EDT 2019


New submission from Joe Borg <cyborg101010 at gmail.com>:

Reading from https://docs.python.org/3/library/subprocess.html#subprocess.CompletedProcess

"""
If you ran the process with stderr=subprocess.STDOUT, stdout and stderr will be combined in this attribute, and stderr will be None.
"""

But, if you run `run()` with `capture_output=True`, you get the following exception:

"""
ValueError: stdout and stderr arguments may not be used with capture_output.
"""

So, it seems impossible to get the combined outputs of stdout and stderr with `run()`.

----------
components: Library (Lib)
messages: 341158
nosy: Joe.Borg
priority: normal
severity: normal
status: open
title: subprocess.run fails with capture_output=True and stderr=STDOUT
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36760>
_______________________________________


More information about the New-bugs-announce mailing list