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. |