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
import error when non-ascii characters are present in cwd or user name (windows) #3516
Comments
Partial duplicate of #3487. |
I think this is a Python bug that is reportedly is unfixable on Python 2. See this: http://bugs.python.org/issue13207 It looks difficult to workaround, since even if we do the home directory lookup ourselves, you can't get a unicode environment variable on Windows on Python 2. There is a proposed ctypes solution, but ick. One possible workaround is to define the |
Yeah, tracebacks point to the problem in the python 2 library itself. Did previous version not check for anything in the user home path? @mmagnuski, which previous version of matplotlib worked for you in the past and were you using python2? |
I changed to matplotlib 1.3.1 and importing works fine. I don't remember which version I used originally but most probably something around 1.3 |
If the issue is the underlying python bug, why does 1.3.1 work? Where did you install mpl on your system? |
@tacaswell, maybe we see the problem now because we are using |
I tracked this back via blame and it looks like what happened is that in ca6cd19 the Older version of mpl are just silently snarfing the error. |
closes matplotlib#3516 by ignoring the real problem. The real problem seems to be in the core libary ( http://bugs.python.org/issue13207) to which the response was 'upgrade to python 3'.
If this is relevant - I do have a |
Can you see if this the patch in #3532 works? The next block of code after this one tries to get the home directory from the envs |
A user of my app just run into the same problem with 1.4, downgraded my app to mpl 1.3 which does not show this problem. |
On 9/29/2014 14:55, Thomas A Caswell wrote:
I can test it here, but only on my test machine, so need to py2exe app - Unfortunately this doesn't help, I now get the exception: What is strange is that this worked with 1.3 and if I do Could it have to do with "from future import unicode_literals" ? Werner |
On 9/29/2014 14:55, Thomas A Caswell wrote:
from future import unicode_literals |
On 9/29/2014 14:55, Thomas A Caswell wrote:
I tried on the test Python prompt without getting an exception and the from future import unicode_literals |
On 9/29/2014 14:55, Thomas A Caswell wrote:
|
Could you put that in a PR? On Mon, Sep 29, 2014 at 12:03 PM, Werner F Bruhin notifications@github.com
Thomas Caswell |
closed by #3594 |
Ahoy!
I have recently updated matplotlib through conda to version
14.0
(np19py27_0
).I am using windows 8, python 2.7.7 (Anaconda distribution 2.0.2 32-bit)
Unfortunatelly my windows user name contains non-ascii caracter (
ś
) and importing matplotlib gives errors. 😢 (previous matplotlib versions I used did not have any problem with this)The error comes in two flavors:
⚫ If my current working directory contains non-ascii character then:
⚫ If I change my current directory so that it does not contain any ascii characters the error transforms itself a little:
The text was updated successfully, but these errors were encountered: