[yt-users] Odd path issue

Matthew Turk matthewturk at gmail.com
Mon Jan 3 19:38:46 PST 2011


Hi Dave,

Not sure exactly what's going on, but can you try removing the
fontcache from your ~/.matplotlib directory?  It seems that lately
some people have had issues with corruption there.  It stores all the
paths, etc, that are being dredged up here.

-Matt

On Mon, Jan 3, 2011 at 4:04 PM, david collins <antpuncher at gmail.com> wrote:
> Hi there--
>
> I have this odd problem when trying to save a projection.  I do
>
> pc.add_projection(field,axis)
> pc.save(name)
>
> on newly made projection (not one taken from the cache in X.yt file)
> and it gives me the following mess:
>
> <errstack>
>    print self.pc.save(frame_template%(frame), format = self.format)
>  File "/nics/b/home/collins/local_xt5/src/yt-hg/yt/yt/visualization/plot_collection.py",
> line 153, in save
>    override=override, force_save=force_save))
>  File "/nics/b/home/collins/local_xt5/src/yt-hg/yt/yt/visualization/plot_types.py",
> line 121, in save_image
>    only_on_root(canvas.print_figure, fn)
>  File "/nics/b/home/collins/local_xt5/src/yt-hg/yt/yt/funcs.py", line
> 347, in only_on_root
>    return func(*args,**kwargs)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backend_bases.py",
> line 1419, in print_figure
>    **kwargs)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backend_bases.py",
> line 1308, in print_eps
>    return ps.print_eps(*args, **kwargs)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backends/backend_ps.py",
> line 869, in print_eps
>    return self._print_ps(outfile, 'eps', *args, **kwargs)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backends/backend_ps.py",
> line 895, in _print_ps
>    orientation, isLandscape, papertype)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backends/backend_ps.py",
> line 969, in _print_figure
>    self.figure.draw(renderer)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/figure.py",
> line 772, in draw
>    for a in self.axes: a.draw(renderer)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/axes.py",
> line 1601, in draw
>    a.draw(renderer)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/text.py",
> line 452, in draw
>    bbox, info = self._get_layout(renderer)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/text.py",
> line 253, in _get_layout
>    clean_line, self._fontproperties, ismath=ismath)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/backends/backend_ps.py",
> line 308, in get_text_width_height_descent
>    self.mathtext_parser.parse(s, 72, prop)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/mathtext.py",
> line 2795, in parse
>    font_output = fontset_class(prop, backend)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/mathtext.py",
> line 658, in __init__
>    self._stix_fallback = StixFonts(*args, **kwargs)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/mathtext.py",
> line 902, in __init__
>    fullpath = findfont(name)
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/site-packages/matplotlib/font_manager.py",
> line 1307, in findfont
>    if not os.path.exists(font):
>  File "/nics/b/home/collins/local_xt5/lib/python2.6/genericpath.py",
> line 18, in exists
>    st = os.stat(path)
> TypeError: coercing to Unicode: need string or buffer, dict found
> </errstack>
>
> pdb shows that
> (Pdb) path
> {'afm': None, 'ttf':
> '/nics/b/home/collins/local_nautalus/src/yt-x86_64/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf'}
>
> which isn't a path.
>
> I just built from changeset 3628:da3894bf42a5.
>
> If I then re-do the plot commands (so it reads the cached projection
> off disk) it works fine.  Has anyone seen this problem?
>
> Thanks,
> d.
>
> --
> Sent from my Stone Tablet and carried by my Pterodactyl.
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list