
I'm having trouble writing a plot png to disk, and it seems that my dev installation script might be the culprit, it's giving me the error:
File "/nics/b/home/gsiisg/NautilusYT/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 "/nics/b/home/gsiisg/NautilusYT/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 /nics/b/home/gsiisg/NautilusYT/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
In the installation script on line 578 there's:
if [ -e $HOME/.matplotlib/fontList.cache ] && \ ( grep -q python2.6 $HOME/.matplotlib/fontList.cache )
looking for the 2.6 stuff, even though it installed 2.7, could this be the cause of my problem? Will changing the 2.6 to 2.7 fix it?
From G.S.

Geoffrey,
The line you cite in the install script is set up to warn you whether or not any fontfile caches exist. If it finds them, it suggests that you delete them -- it's designed to prevent what it looks like has happened here. :)
Maybe you could try removing the cache, and seeing that helps?
rm ~/.matplotlib/*.cache
-Matt
On Fri, Apr 22, 2011 at 7:21 PM, gso@physics.ucsd.edu wrote:
I'm having trouble writing a plot png to disk, and it seems that my dev installation script might be the culprit, it's giving me the error:
File "/nics/b/home/gsiisg/NautilusYT/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 "/nics/b/home/gsiisg/NautilusYT/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 /nics/b/home/gsiisg/NautilusYT/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
In the installation script on line 578 there's:
if [ -e $HOME/.matplotlib/fontList.cache ] && \ ( grep -q python2.6 $HOME/.matplotlib/fontList.cache )
looking for the 2.6 stuff, even though it installed 2.7, could this be the cause of my problem? Will changing the 2.6 to 2.7 fix it?
From G.S.
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

there was only an empty directory tex.cache, I removed it, submitted the script, and got the same error while trying to write the png, I get the same error when I tried to write png under iyt.
From G.S.
Geoffrey,
The line you cite in the install script is set up to warn you whether or not any fontfile caches exist. If it finds them, it suggests that you delete them -- it's designed to prevent what it looks like has happened here. :)
Maybe you could try removing the cache, and seeing that helps?
rm ~/.matplotlib/*.cache
-Matt
On Fri, Apr 22, 2011 at 7:21 PM, gso@physics.ucsd.edu wrote:
I'm having trouble writing a plot png to disk, and it seems that my dev installation script might be the culprit, it's giving me the error:
File "/nics/b/home/gsiisg/NautilusYT/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 "/nics/b/home/gsiisg/NautilusYT/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 /nics/b/home/gsiisg/NautilusYT/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
In the installation script on line 578 there's:
if [ -e $HOME/.matplotlib/fontList.cache ] && \ ( grep -q python2.6 $HOME/.matplotlib/fontList.cache )
looking for the 2.6 stuff, even though it installed 2.7, could this be the cause of my problem? Will changing the 2.6 to 2.7 fix it?
From G.S.
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi G.S.,
Try finding any other *.cache files. They would be named like this:
fontList.cache tex.cache
Specifically, the first one, fontList.cache. Look in your submission directory, too -- my guess is that they might be there, if you are running on Nautilus or Kraken. Sometimes on those systems one specifies MPLCONFIGDIR in your submission script.
-MAtt
On Fri, Apr 22, 2011 at 7:29 PM, gso@physics.ucsd.edu wrote:
there was only an empty directory tex.cache, I removed it, submitted the script, and got the same error while trying to write the png, I get the same error when I tried to write png under iyt.
From G.S.
Geoffrey,
The line you cite in the install script is set up to warn you whether or not any fontfile caches exist. If it finds them, it suggests that you delete them -- it's designed to prevent what it looks like has happened here. :)
Maybe you could try removing the cache, and seeing that helps?
rm ~/.matplotlib/*.cache
-Matt
On Fri, Apr 22, 2011 at 7:21 PM, gso@physics.ucsd.edu wrote:
I'm having trouble writing a plot png to disk, and it seems that my dev installation script might be the culprit, it's giving me the error:
File "/nics/b/home/gsiisg/NautilusYT/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 "/nics/b/home/gsiisg/NautilusYT/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 /nics/b/home/gsiisg/NautilusYT/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
In the installation script on line 578 there's:
if [ -e $HOME/.matplotlib/fontList.cache ] && \ ( grep -q python2.6 $HOME/.matplotlib/fontList.cache )
looking for the 2.6 stuff, even though it installed 2.7, could this be the cause of my problem? Will changing the 2.6 to 2.7 fix it?
From G.S.
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

I went to my MPLCONFIGDIR and deleted tex.cache/ directory but when I ran the script it created it again.
Traceback pasted to http://paste.enzotools.org/show/TSPvBPWcY1jqtXiLNXRo
export MPI_SHARED_NEIGHBORHOOD=HOST export PATH=.:/nics/b/home/gsiisg/NautilusYT/bin:$PATH export PYTHONPATH=/nics/b/home/gsiisg/NautilusYT/lib:/nics/b/home/gsiisg/NautilusYT/lib/python:$PYTHONPATH export LD_LIBRARY_PATH=/nics/b/home/gsiisg/NautilusYT/lib:$LD_LIBRARY_PATH export MPLCONFIGDIR=/gpfs/medusa/gsiisg
these are my environmental variables
From G.S.
Hi G.S.,
Try finding any other *.cache files. They would be named like this:
fontList.cache tex.cache
Specifically, the first one, fontList.cache. Look in your submission directory, too -- my guess is that they might be there, if you are running on Nautilus or Kraken. Sometimes on those systems one specifies MPLCONFIGDIR in your submission script.
-MAtt
On Fri, Apr 22, 2011 at 7:29 PM, gso@physics.ucsd.edu wrote:
there was only an empty directory tex.cache, I removed it, submitted the script, and got the same error while trying to write the png, I get the same error when I tried to write png under iyt.
From G.S.
Geoffrey,
The line you cite in the install script is set up to warn you whether or not any fontfile caches exist. If it finds them, it suggests that you delete them -- it's designed to prevent what it looks like has happened here. :)
Maybe you could try removing the cache, and seeing that helps?
rm ~/.matplotlib/*.cache
-Matt
On Fri, Apr 22, 2011 at 7:21 PM, gso@physics.ucsd.edu wrote:
I'm having trouble writing a plot png to disk, and it seems that my dev installation script might be the culprit, it's giving me the error:
File "/nics/b/home/gsiisg/NautilusYT/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 "/nics/b/home/gsiisg/NautilusYT/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 /nics/b/home/gsiisg/NautilusYT/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf/Vera.ttf; Cannot_Open_Resource
In the installation script on line 578 there's:
if [ -e $HOME/.matplotlib/fontList.cache ] && \ ( grep -q python2.6 $HOME/.matplotlib/fontList.cache )
looking for the 2.6 stuff, even though it installed 2.7, could this be the cause of my problem? Will changing the 2.6 to 2.7 fix it?
From G.S.
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

I didn't see that directory created anywhere or in my MPLCONFIGDIR :-(
From G.S.
Geoffrey,
Specifically, the first one, fontList.cache.
tex.cache isn't what you need to delete. fontList.cache is.
j _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

Hi Geoffrey,
It's somewhere. If you can replicate this error in interactive mode, you can use these commands to figure out where matplotlib is looking for its cache:
import matplotlib print matplotlib._get_configdir() print matplotlib._get_data_path() print matplotlib._get_data_path_cached()
Coincidentally enough, I just got this error locally after an upgrade, and it was fixed by removing my cache files...
-Matt
On Fri, Apr 22, 2011 at 8:07 PM, gso@physics.ucsd.edu wrote:
I didn't see that directory created anywhere or in my MPLCONFIGDIR :-(
From G.S.
Geoffrey,
Specifically, the first one, fontList.cache.
tex.cache isn't what you need to delete. fontList.cache is.
j _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org

That worked for some reason, on the second try. After deleting both the tex.cache and fontList.cache the first time running my script said the file tex.cache existed, and gave bunch of errors, but when I ran the script again it didn't produce any errors and I can write to disk.
Thanks for the help!
From G.S.
Hi Geoffrey,
It's somewhere. If you can replicate this error in interactive mode, you can use these commands to figure out where matplotlib is looking for its cache:
import matplotlib print matplotlib._get_configdir() print matplotlib._get_data_path() print matplotlib._get_data_path_cached()
Coincidentally enough, I just got this error locally after an upgrade, and it was fixed by removing my cache files...
-Matt
On Fri, Apr 22, 2011 at 8:07 PM, gso@physics.ucsd.edu wrote:
I didn't see that directory created anywhere or in my MPLCONFIGDIR :-(
From G.S.
Geoffrey,
Specifically, the first one, fontList.cache.
tex.cache isn't what you need to delete. fontList.cache is.
j _______________________________________________ Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
Yt-dev mailing list Yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (3)
-
gso@physics.ucsd.edu
-
j s oishi
-
Matthew Turk