8000 Unicode decode error [backport to 1.4.x] by wernerfb · Pull Request #3594 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Unicode decode error [backport to 1.4.x] #3594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 30, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,10 @@ def _get_home():
http://mail.python.org/pipermail/python-list/2005-February/325395.html
"""
try:
path = os.path.expanduser(&quo 5237 t;~")
if six.PY2 and sys.platform == 'win32':
path = os.path.expanduser(b"~").decode(sys.getfilesystemencoding())
else:
path = os.path.expanduser("~")
except ImportError:
# This happens on Google App Engine (pwd module is not present).
pass
Expand Down
0