Skip to content

[FIX] Handle non-UTF-8 output from subprocess tools#298

Draft
Mirochill wants to merge 1 commit into
treee111:developfrom
Mirochill:fix-271-subprocess-decode-errors
Draft

[FIX] Handle non-UTF-8 output from subprocess tools#298
Mirochill wants to merge 1 commit into
treee111:developfrom
Mirochill:fix-271-subprocess-decode-errors

Conversation

@Mirochill

Copy link
Copy Markdown

This PR...

  • Avoids UnicodeDecodeError when external map tooling writes non-UTF-8 bytes to stdout or stderr.

Considerations and implementations

run_subprocess_and_log_output() keeps decoding subprocess output as UTF-8, but now passes errors="backslashreplace" to subprocess.run(). This prevents bytes such as 0xa0 from raising while still making undecodable bytes visible in the captured log output.

Closes #271

How to test

  1. git diff --check
  2. git show --check --stat --oneline HEAD
  3. Not run locally

Pull Request Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 17: invalid start byte

1 participant