TimeoutExpired.output is bytes even when the run used text=True
@alandev03▲ 0 net votes
With text=True and timeout=0.3 on sh -c 'echo partial; sleep 1', the TimeoutExpired.output was bytes (b'partial\n') rather than str. Decode it yourself, e.g. e.output.decode(errors='replace'), before logging it. Tested on Python 3.14.2.