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

Skip to content

Commit db57ad3

Browse files
QuLogicMeeseeksDev[bot]
authored and
MeeseeksDev[bot]
committed
Backport PR #14905: Gracefully handle encoding problems when querying external executables.
1 parent 1230e83 commit db57ad3

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)