Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Error loading fonts on OSX 10.11 #5386
Comments
|
Probably the same as #5314. I think your assessment isn't quite right though. There's something fishy here, but I don't think matplotlib catching a ValueError is the right thing to do. According to the docs, that should only be raised when invalid arguments are passed to I found other reports of similar bugs: this seems to be the new symptom for "file not found" on OSX 10.11, which is definitely broken behavior: rg3/youtube-dl#6840 Also, for fun: https://i.imgur.com/To3DQ6J.jpg Does:
also give the same error? If so, definitely a bug that should be reported to CPython and/or Apple. |
|
That is an awesome cartoon! |
|
I found it on the Python bugtracker. https://bugs.python.org/issue18172 |
|
Further feedback from my 10.11 source:
|
|
Great. I'd say it's definitely a bug in Python 2.7.10 and/or an incompatiblity between how Apple builds Python 2.7.10 and El Capitain. I'd report this to CPython and/or Apple. I'd file the report myself, but since I don't have El Capitain to reproduce on, I'm afraid I won't be of much use. |
|
I can't reproduce it in any way using neither system python nor python 2.7 or 3.5 from homebrew on 10.11.1. Could it be fixed in the 10.11.1 update? |
|
@jenshnielsen - is it possible that you have |
|
Yes I have font-config installed. What I meant was that I can't reproduce the issue with a non existing command such as 'foo' with either python version i.e. running
raises a FileNotFoundError as expected. |
|
Ah - sorry for my confusion. My colleague also has 10.11.1. Can you think of any other explanation for the difference. |
|
Just a shot in the dark but could it be something like a non ascii username/path |
|
I don't think that's the case for my colleague's machine. We just upgraded a machine, and don't get the failure either. |
|
Nicholas Angelides is my colleague with this bug - we sat down with his computer for a few minutes. This expanded the confusion. We replicated the behavior above, both on his account and a new |
tacaswell
added GUI/osx OS/Apple and removed GUI/osx
labels
Nov 11, 2015
tacaswell
added this to the
unassigned
milestone
Nov 11, 2015
|
Hurrah, a Heisenbug! |
mariusae
commented
Dec 1, 2015
|
It appears python is assuming that a single read() call will read all available data (until EOF). That is not so. This should fix it:
|
|
That needs to be reported upstream, we are not going to ship a monkey patch to a core library. |
tacaswell
added the
upstream fix required
label
Dec 1, 2015
mariusae
commented
Dec 1, 2015
|
Yep, wasn't suggesting that... just giving people a workaround until it is resolved. |
yan12125
commented
Jan 11, 2016
|
Seems nobody has reported it to Python. Here it is: http://bugs.python.org/issue26083. |
gpshead
commented
Jan 11, 2016
|
A good workaround for matplotlib would be to use subprocess32 instead of subprocess when running on Python 2. It is better in too many ways to list here (and acts as a drop in replacement). The upstream issue has been fixed in 2.7. But I wouldn't expect Apple to fix anything in a timely manner. Pro tip: Build and install your own Python, never use the one shipped by your OS distro. |
ludoleg
commented
Feb 6, 2016
|
I don't see the 2.7.12 release out yet . What is the best way to work around this issue to run matplotlib on El Capitan? |
acer9997
commented
Feb 16, 2016
|
I'm also having this issue, and my Python is installed through HomeBrew. Why not go with @gpshead advice instead of waiting for a fix from Python?
|
This was referenced Mar 31, 2016
|
@acer9997 pull requests are always welcome. |
|
2.0 will require |
matthew-brett commentedNov 3, 2015
A colleague ran into the following error after installing a fresh copy of Matplotlib on OSX 10.11:
Not surprisingly, the problem turns out to be in
get_fontconfig_fontswhere the commandsubprocess.Popen(['fc-list', '--format=%{file}\\n'], ...)returns aValueErrorinstead of the expectedOSError, IOErrorand so the routine tries to load a pickle from the error message text and fails.fc-listdoes not exist on my colleague's system.