Decode subprocess output to utf-8 or regex will fail #1879

Closed
wants to merge 1 commit into
from
View
2 lib/matplotlib/font_manager.py
@@ -1287,7 +1287,7 @@ def fc_match(pattern, fontext):
except OSError:
return None
if pipe.returncode == 0:
- for match in _fc_match_regex.finditer(output):
+ for match in _fc_match_regex.finditer(output.decode("utf-8")):
file = match.group(1)
if os.path.splitext(file)[1][1:] in fontexts:
return file