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
Skip over broken TTF font when creating cache #5233
Conversation
@@ -587,7 +587,7 @@ def createFontList(fontfiles, fontext='ttf'): | |||
continue | |||
try: | |||
prop = ttfFontProperty(font) | |||
except KeyError: | |||
except KeyError, RuntimeError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python3 requires ()
on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh!
Skip over broken TTF font when creating cache
Skip over broken TTF font when creating cache
back ported as 0cb18e0 |
I'm still getting the same error. When I try to import matplotlib.font_managerI get an error in the function ttfFontProperty(Font)on the line 396 |
I added ValueError at line 592. Seems to work now. except KeyError, RuntimeError: |
@JGalvezTT What version of mpl are you using? |
@tacaswell, I'm using 1.5.1 on Anaconda. I got it to work by adding ValueError as an exception on the line 592. But now I'm getting error in other libraries (Opencv). So it might be that something is wrong on my set up. |
I also got this error on fedora 24, matplotlib version 1.5.2rc2. The bad font was "Truetypewriter PolyglOTT" font available from: http://www.fontsaddict.com/font/truetypewriter-polyglott.html . The error trace was:
|
@dov can you make a new issue? This fell through the cracks for 1.5.x 😞 |
Ok. I did. See: #6702 . Unfortunately I seem to have erased the font that caused the crash. :-( |
Closes matplotlib#6702 Extension of matplotlib#5233
Fixes #5232.