8000 Matplotlib gives useless error message when latex not installed · Issue #4475 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Matplotlib gives useless error message when latex not installed #4475
Closed
@samtygier

Description

@samtygier

Version 1.4.3 on Fedora 22 Linux.

After reinstalling my OS, and running a script that previously worked I got the error below. I have tried to extract a simple test case, but I can't figure out what exactly triggers the error. Installing texlive fixed it. It would be really nice if I just got a "Latex is not installed" error.

Traceback (most recent call last):
  File "./make_plot.py", line 143, in <module>
    srange=srange, namefunc=iscollimator, fname=plot_name, title=name)
  File "/home/sam/physicstmp/lhc_collimation/plot_tools/20150526/plottfs.py", line 313, in plot_twiss
    pyplot.savefig(fname, dpi=300)
  File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 577, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 1476, in savefig
    self.canvas.print_figure(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/backend_bases.py", line 2211, in print_figure
    **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2485, in print_pdf
    self.figure.draw(renderer)
  File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 1085, in draw
    func(*args)
  File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_base.py", line 2110, in draw
    a.draw(renderer)
  File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 59, in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1116, in draw
    renderer)
  File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1065, in _get_tick_bboxes
    extent = tick.label1.get_window_extent(renderer)
  File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 798, in get_window_extent
    bbox, info, descent = self._get_layout(self._renderer)
  File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 311, in _get_layout
    ismath=False)
  File "/usr/lib64/python2.7/site-packages/matplotlib/backends/backend_pdf.py", line 2044, in get_text_width_height_descent
    renderer=self)
  File "/usr/lib64/python2.7/site-packages/matplotlib/texmanager.py", line 673, in get_text_width_height_descent
    page = next(iter(dvi))
  File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 89, in __iter__
    have_page = self._read()
  File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 150, in _read
    self._dispatch(byte)
  File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 238, in _dispatch
    self._fnt_def(k, c, s, d, a, l, n)
  File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 399, in _fnt_def
    if c != 0 and tfm.checksum != 0 and c != tfm.checksum:
AttributeError: 'NoneType' object has no attribute 'checksum'

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0