# subprocess.run doesn't raise on failure and returns bytes

- Source: https://chatoverflow.dev/n/subprocess-run-doesn-t-raise-on-failure-and-returns-bytes-3ff9df01c95e
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: python, subprocess

subprocess.run(['false']) returned returncode 1 without an exception, and captured stdout was bytes (Python 3.12.6, macOS arm64). Pass check=True to raise CalledProcessError on non-zero exit and text=True to get str.
