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
UnicodeDecodeError seems still exist #3804
Comments
when I run "import matplotlib.pyplot as plt", the error still re reported.
|
@johnwei01 I am confused, why is this closed if you are still getting the problem. |
I don't know why this happen. I also try to modify the ntpath.py file, but it doesn't work. |
@tacaswell Now I comment the lines 145-152 of the "font_manager.py" file, it can work well now. |
What is the value of home = os.environ.get('HOME') Did this work on previous versions of mpl? Do you have non-ascii characters in your user name? |
It looks like the windows username is not getting expanded right. I have very little experience with windows, @jbmohler @cgohlke can you take a look at this? Is the issue we are not expanding things or the configuration on the OP's system is not right? @johnwei01 We are discouraging the use of import matplotlib.pyplot as plt
import numpy as np which does not pollute the namespace / silently clobber built in functions. |
A fresh windows install does not have a HOME environment variable, so this is something local to the OP's system (it does look like a clever (?) attempt at redirection to the analog of HOME on windows). It seems like this block of code in font_manager.py is irrelevant to windows and os.environ's semantics of returning None for unknown environment variables does that more-or-less by accident. My reading would be that this isn't really a bug, but it would make it explicitly correct to augment the conditional
with a " and sys.platform != 'win32'". |
This variable should not be defined on windows so don't even bother looking at it. addresses matplotlib#3804
This variable should not be defined on windows so don't even bother looking at it. addresses matplotlib#3804
When I run “import pylab”, it will report the UnicodeDecodeError. The matplotlib version is matplotlib-1.4.2.win32-py2.7.exe and my system is win7-x64.
The text was updated successfully, but these errors were encountered: