Skip to content
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

Bad fonts crashes matplotlib on startup #6702

Closed
3 tasks done
dov opened this issue Jul 7, 2016 · 2 comments
Closed
3 tasks done

Bad fonts crashes matplotlib on startup #6702

dov opened this issue Jul 7, 2016 · 2 comments
Milestone

Comments

@dov
Copy link

dov commented Jul 7, 2016

To help us understand and resolve your issue please check that you have provided
the information below.

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

ֹLinux Fedora 24.

In [1]: import matplotlib; matplotlib._version.get_versions()
Out[1]:
{u'dirty': False,
u'error': None,
u'full-revisionid': u'b572f64641b7ab91d40e64b1841ce2381cbd2e05',
u'version': u'1.5.2rc2'}

  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

Installed from dnf

  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces the issue
    and can be run with out any other (or as few as possible) external dependencies.
  1. Install a "bad font". Unfortunately I erased the font that caused the problem without saving a copy. :-(
  2. Run:
> python
Python 2.7.11 (default, Jun 21 2016, 09:15:12) 
[GCC 6.1.1 20160510 (Red Hat 6.1.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib

/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
  File "<stdin>", line 20, in <module>
  File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>
    import matplotlib.colorbar
  File "/usr/lib64/python2.7/site-packages/matplotlib/colorbar.py", line 34, in <module>
    import matplotlib.collections as collections
  File "/usr/lib64/python2.7/site-packages/matplotlib/collections.py", line 27, in <module>
    import matplotlib.backend_bases as backend_bases
  File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 62, in <module>
    import matplotlib.textpath as textpath
  File "/usr/lib64/python2.7/site-packages/matplotlib/textpath.py", line 15, in <module>
    import matplotlib.font_manager as font_manager
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1421, in <module>
    _rebuild()
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1406, in _rebuild
    fontManager = FontManager()
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 1059, in __init__
    self.ttflist = createFontList(self.ttffiles)
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 590, in createFontList
    prop = ttfFontProperty(font)
  File "/usr/lib64/python2.7/site-packages/matplotlib/font_manager.py", line 396, in ttfFontProperty
    sfnt = font.get_sfnt()
ValueError: No SFNT name table

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jul 7, 2016
@mm-wang
Copy link

mm-wang commented Oct 6, 2016

This seems to be a problem in matplotlib 1.5.3 as well, using Windows 7 and Python 2.7.12.

@tacaswell
Copy link
Member

Can you try with 2.0.0b4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants