[prev in list] [next in list] [prev in thread] [next in thread]
List: python-bugs-list
Subject: [issue36760] subprocess.run fails with capture_output=True and stderr=STDOUT
From: Karthikeyan Singaravelan <report () bugs ! python ! org>
Date: 2019-04-30 17:02:11
Message-ID: 1556643731.65.0.54981786513.issue36760 () roundup ! psfhosted ! org
[Download RAW message or body]
Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment:
Are you using something like below? This exception was added with \
ce0f33d04528fcafc673a8707871f8430d8f7ce8 (issue32102)
> > > subprocess.run('ls', stdout=subprocess.PIPE, capture_output=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/subprocess.py", line \
469, in run raise ValueError('stdout and stderr arguments may not be used '
ValueError: stdout and stderr arguments may not be used with capture_output.
There is a note on the docs and a discussion on the issue that capture_output and \
stdout/stderr cannot be used at the same time.
https://docs.python.org/3/library/subprocess.html#subprocess.run
> If capture_output is true, stdout and stderr will be captured. When used, the \
> internal Popen object is automatically created with stdout=PIPE and stderr=PIPE. \
> The stdout and stderr arguments may not be supplied at the same time as \
> capture_output.
----------
nosy: +gregory.p.smith, xtreak
_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue36760>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-bugs-list%40marc.info
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic