Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d1ffc9

Browse files
authored
Merge pull request #14938 from meeseeksmachine/auto-backport-of-pr-14905-on-v3.1.x
Backport PR #14905 on branch v3.1.x (Gracefully handle encoding problems when querying external executables.)
2 parents 4762387 + db57ad3 commit 1d1ffc9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
321321
# at least min_ver (if set); else, raise FileNotFoundError.
322322
try:
323323
output = subprocess.check_output(
324-
args, stderr=subprocess.STDOUT, universal_newlines=True)
324+
args, stderr=subprocess.STDOUT,
325+
universal_newlines=True, errors="replace")
325326
except subprocess.CalledProcessError as _cpe:
326327
if ignore_exit_code:
327328
output = _cpe.output

0 commit comments

Comments
 (0)