Skip to content

Commit 616f473

Browse files
committed
- Unicode decode error due to special characters (e.g. üö etc) in users home dir name
1 parent 6dfeab5 commit 616f473

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def _get_home():
523523
http://mail.python.org/pipermail/python-list/2005-February/325395.html
524524
"""
525525
try:
526-
path = os.path.expanduser("~")
526+
path = os.path.expanduser(b"~").decode(sys.getfilesystemencoding())
527527
except ImportError:
528528
# This happens on Google App Engine (pwd module is not present).
529529
pass

0 commit comments

Comments
 (0)