Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add errors="backslashreplace" to run_with_env_secrets.py (#5456)
See: https://fb.workplace.com/groups/4571909969591489/permalink/7818394354943018/ ExecuTorch CI was running into an issue where non-utf8 print output caused tests to crash. This was resolved by removing the printing in pytorch/executorch#4268. This PR updates the error handling to use `backslashreplace`, which should still show us the error/printing, but without crashing the test. From https://docs.python.org/3.9/library/io.html#io.TextIOWrapper: ``` 'backslashreplace' causes malformed data to be replaced by a backslashed escape sequence. ``` From https://docs.python.org/3/library/subprocess.html#frequently-used-arguments: If encoding or errors are specified, or text (also known as universal_newlines) is true, the file objects stdin, stdout and stderr will be opened in text mode using the encoding and errors specified in the call or the defaults for [io.TextIOWrapper](https://docs.python.org/3/library/io.html#io.TextIOWrapper).
- Loading branch information