[Python-modules-team] Bug#644987: Bug#644987: Crashes with 'IndexError: list index out of range'

Evgeny Kurbatov EvgenyKurbatov at yandex.ru
Tue Oct 11 13:52:27 UTC 2011


On Tue, 11 Oct 2011 14:59:40 +0200
Sandro Tosi <morph at debian.org> wrote:

> severity 644987 minor
> tags 644987 +unreproducible
> thanks
> 
> On Tue, Oct 11, 2011 at 14:27, Evgeny Kurbatov
> <EvgenyKurbatov at yandex.ru> wrote:
> > Package: python-matplotlib
> > Version: 1.0.1-3
> > Severity: important
> >
> >
> > Dear Mainteiner,
> >
> > Running demos from '/usr/share/doc/python-matplotlib-doc/examples' I
> > got no output except an error:
> >
> > $ python2.6 subplot_demo.py
> > Traceback (most recent call last):
> >  File "subplot_demo.py", line 2, in <module>
> >    from pylab import *
> >  File "/usr/lib/pymodules/python2.6/pylab.py", line 1, in <module>
> >    from matplotlib.pylab import *
> >  File "/usr/lib/pymodules/python2.6/matplotlib/pylab.py", line 220,
> > in <module> from matplotlib import mpl  # pulls in most modules
> >  File "/usr/lib/pymodules/python2.6/matplotlib/mpl.py", line 2, in
> > <module> from matplotlib import axis
> >  File "/usr/lib/pymodules/python2.6/matplotlib/axis.py", line 10, in
> > <module> import matplotlib.font_manager as font_manager
> >  File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py",
> > line 1349, in <module> _rebuild()
> >  File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py",
> > line 1299, in _rebuild fontManager = FontManager()
> >  File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py",
> > line 1023, in __init__ self.afmlist = createFontList(self.afmfiles,
> > fontext='afm')
> >  File "/usr/lib/pymodules/python2.6/matplotlib/font_manager.py",
> > line 591, in createFontList font = afm.AFM(fh)
> >  File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 304, in
> > __init__ parse_afm(fh)
> >  File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 292, in
> > parse_afm dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
> >  File "/usr/lib/pymodules/python2.6/matplotlib/afm.py", line 176, in
> > _parse_char_metrics name = vals[2].split()[1]
> > IndexError: list index out of range
> >
> >
> > I've tried both python2.6 and python2.7 and had the same error.
> > It looks like a font problem but I didn't touch anything in the
> > Python installation. Everything was installed via aptitude.
> >
> > Today, 2011-10-11, I've updated Wheezy but it doesn't help.
> >
> > I am using Debian GNU/Linux Wheezy, kernel 3.0.0-1-686-pae, libc6
> > (eglibc) 2.13-21.
> 
> I'm on sid, but I tested the version you mentioned and it works for
> me. It's something in your setup: try reinstall python-matplotlib
> and/or upgrade to the sid version of it (1.1.0).

Hello, Sandro,

Unfortunately the problem had been solved. Analysis showed the
matplotlib didn't like a font installed into ~/.fonts (actually not the
font itself but its description in ~/.fonts/font.map and fonts.dir).
For now I don't need that font. After removing it everything had been
worked. However, it is not good for library to crash if some
third-party data is malformed in its opinion, especially when all other
programs dealing with the fonts work fine.

Regards,
Evgeny Kurbatov





More information about the Python-modules-team mailing list