SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: David K. <dav...@gm...> - 2010年10月31日 15:27:37
Hello, Im running the last matplotlib version.
I just want to plot an histogram. Here is the complete backtrace, complaining 
about the Vera.ttf font missing :
Any idea ?
Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", 
line 393, in expose_event
 self._render_figure(self._pixmap, w, h)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py", 
line 75, in _render_figure
 FigureCanvasAgg.draw(self)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 394, in draw
 self.figure.draw(self.renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 798, in draw
 func(*args)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 1934, in draw
 a.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 1017, in draw
 tick.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 234, in draw
 self.label1.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 524, in draw
 bbox, info = self._get_layout(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 298, in 
_get_layout
 ismath=False)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 180, in get_text_width_height_descent
 font = self._get_agg_font(prop)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 221, in _get_agg_font
 font = FT2Font(str(fname))
RuntimeError: Could not open facefile /usr/lib/python2.6/site-
packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", 
line 393, in expose_event
 self._render_figure(self._pixmap, w, h)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py", 
line 75, in _render_figure
 FigureCanvasAgg.draw(self)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 394, in draw
 self.figure.draw(self.renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/figure.py", line 798, in draw
 func(*args)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axes.py", line 1934, in draw
 a.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 1017, in draw
 tick.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/axis.py", line 234, in draw
 self.label1.draw(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in 
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 524, in draw
 bbox, info = self._get_layout(renderer)
 File "/usr/lib/python2.7/site-packages/matplotlib/text.py", line 298, in 
_get_layout
 ismath=False)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 180, in get_text_width_height_descent
 font = self._get_agg_font(prop)
 File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", 
line 221, in _get_agg_font
 font = FT2Font(str(fname))
RuntimeError: Could not open facefile /usr/lib/python2.6/site-
packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
From: daryl h. <ak...@ia...> - 2010年10月31日 15:41:23
On 2010年10月31日, David Kremer wrote:
> File "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py",
python 2.7 ^^
> RuntimeError: Could not open facefile /usr/lib/python2.6/site-
> packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
python 2.6 ^^
I believe this problem is fixed in the next matplotlib release. A 
workaround is to remove a local font cache file:
rm ~/.matplotlib/fontList.cache
HTH,
daryl
From: David K. <dav...@gm...> - 2010年10月31日 15:49:54
> On 2010年10月31日, David Kremer wrote:
> > File
> > "/usr/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py",
> 
> python 2.7 ^^
> 
> > RuntimeError: Could not open facefile /usr/lib/python2.6/site-
> > packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
> 
> python 2.6 ^^
> 
> I believe this problem is fixed in the next matplotlib release. A
> workaround is to remove a local font cache file:
> 
> rm ~/.matplotlib/fontList.cache
> 
> HTH,
> daryl
It worked. Thank you.
I also did a symbolic link, but your method worked, so I deleted it.
Thank you.
David
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /