[Bug 394502] [NEW] umlauts cause KeyError
Torsten Bronger
bronger at physik.rwth-aachen.de
Wed Jul 1 22:01:43 UTC 2009
Public bug reported:
I use 0.98.5.2 with PDF output and the following settings:
matplotlib.rcParams["text.usetex"] = True
matplotlib.rcParams["text.latex.preamble"] = r"\def\rmdefault{ud2}\usepackage{eulervm}"
matplotlib.rcParams['text.latex.unicode'] = True
("ud2" is a special font that I use.)
Now,
axes.set_ylabel(u"Ätzrate in nm/min")
causes the following TB:
Traceback (most recent call last):
File "plots.py", line 88, in <module>
figure.savefig("aetzen.pdf")
File "/usr/lib/python2.6/dist-packages/matplotlib/figure.py", line 990, in savefig
self.canvas.print_figure(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/matplotlib/backend_bases.py", line 1419, in print_figure
**kwargs)
File "/usr/lib/python2.6/dist-packages/matplotlib/backend_bases.py", line 1313, in print_pdf
return pdf.print_pdf(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/matplotlib/backends/backend_pdf.py", line 1886, in print_pdf
self.figure.draw(renderer)
File "/usr/lib/python2.6/dist-packages/matplotlib/figure.py", line 772, in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/python2.6/dist-packages/matplotlib/axes.py", line 1601, in draw
a.draw(renderer)
File "/usr/lib/python2.6/dist-packages/matplotlib/axis.py", line 725, in draw
self.label.draw(renderer)
File "/usr/lib/python2.6/dist-packages/matplotlib/text.py", line 452, in draw
bbox, info = self._get_layout(renderer)
File "/usr/lib/python2.6/dist-packages/matplotlib/text.py", line 253, in _get_layout
clean_line, self._fontproperties, ismath=ismath)
File "/usr/lib/python2.6/dist-packages/matplotlib/backends/backend_pdf.py", line 1581, in get_text_width_height_descent
page = iter(dvi).next()
File "/usr/lib/python2.6/dist-packages/matplotlib/dviread.py", line 65, in __iter__
yield self._output()
File "/usr/lib/python2.6/dist-packages/matplotlib/dviread.py", line 89, in _output
h = _mul2012(font._scale, font._tfm.height[g])
KeyError: 127
Apparently Matplotlib tries to get the font metrics of glyph 127
(dieresis in OT1 encoding) and finds nothing.
** Affects: matplotlib (Ubuntu)
Importance: Undecided
Status: New
--
umlauts cause KeyError
https://bugs.launchpad.net/bugs/394502
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list