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

Skip to content

Commit bc2f53b

Browse files
authored
Merge pull request #14905 from anntzer/get_executable_info_encoding_error
Gracefully handle encoding problems when querying external executables.
2 parents 59c49ab + e01f107 commit bc2f53b

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
@@ -330,7 +330,8 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
330330
# at least min_ver (if set); else, raise ExecutableNotFoundError.
331331
try:
332332
output = subprocess.check_output(
333-
args, stderr=subprocess.STDOUT, universal_newlines=True)
333+
args, stderr=subprocess.STDOUT,
334+
universal_newlines=True, errors="replace")
334335
except subprocess.CalledProcessError as _cpe:
335336
if ignore_exit_code:
336337
output = _cpe.output

0 commit comments

Comments
 (0)