Re: [matplotlib-devel] Font installation stuff
Hi All- FYI, I am seeing the same problem on intel OSX 10.4.10 Andrew Eric Firing wrote: > Rob, Mike, > > What this implies to me is that either there is a problem with the code > that is generating afmdict (and I did not change that code, I just > caused it to be invoked when the fontManager instance is created.), or > there is a problem with some .afm files on Rob's machine. > > I really don't know how to troubleshoot it beyond this. > > (As a separate issue, I probably I should change font_manager.py so that > if the rcParams value below was changed since the cache was made, it > will be rebuilt with the new value.) > > Eric > > Rob Hetland wrote: >> On Aug 14, 2007, at 1:55 PM, Eric Firing wrote: >> >>> rcParams['pdf.use14corefonts'] >> Indeed, reversing this value fixes the problem. >> >> My value had been set to False. >> pdf.use14corefonts : True >> in the mplrc file works with the latest revision. >> >> -r >> >> >> Rob Hetland, Associate Professor >> Dept. of Oceanography, Texas A&M University >> http://pong.tamu.edu/~rob >> phone: 979-458-0096, fax: 979-845-6331 >> >> >> >> - >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/ >> ___ >> Matplotlib-devel mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > - > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] OSX Font cache problem
Hi- I've got two Intel OSX machines running matplotlib. I recently upgraded one of them to the latest MPL svn. On one machine, I had some pytz-related problems which I resolved, and I was able to use it more or less fine. However, when the very first time I started it, there was a huge pause which I eventually realized had something to do with the font cache, but it seems OK since then (but perhaps there should be a warning message when the cache is being built?) On the other machine, however, I got the traceback below, which I eventually traced to the call OSXInstalledFonts() in findSystemFonts(). Unfortunately, OSXInstalledFonts() is really OSXInstalledFonts(directory=None, fontext=None) which then calls fontext = get_fontext_synonyms(fontext) which fails with fontext=None. I was actually able to fix this by copying the .matplottlib directory from the working machine, but it's still clearly a bug! Yours, Andrew Traceback (most recent call last): File "/Users/jaffe/home/local/bin/ipython", line 8, in load_entry_point('ipython==0.8.1', 'console_scripts', 'ipython')() File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipapi.py", line 356, in launch_new_instance ses = make_session(user_ns) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipapi.py", line 405, in make_session return IPython.Shell.start(user_ns) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", line , in start return shell(user_ns = user_ns) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 1008, in __init__ shell_class=MatplotlibShell) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 74, in __init__ debug=debug,shell_class=shell_class) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipmaker.py", line 95, in make_IPython embedded=embedded,**kw) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 562, in __init__ user_ns,b2 = self._matplotlib_config(name,user_ns) File "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 503, in _matplotlib_config import matplotlib.pylab as pylab File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", line 208, in from matplotlib import mpl # pulls in most modules File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", line 3, in from matplotlib import axis File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", line 20, in from font_manager import FontProperties File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 1129, in _rebuild() File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 1120, in _rebuild fontManager = FontManager() File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 884, in __init__ self.ttffiles = findSystemFonts(paths) + findSystemFonts() File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 254, in findSystemFonts for f in OSXInstalledFonts(): File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 180, in OSXInstalledFonts fontext = get_fontext_synonyms(fontext) File "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", line 100, in get_fontext_synonyms 'afm': ('afm',)}[fontext] KeyError: None gog:~% mv .matplotlib tmp.matplotlib; scp - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] OSX Font cache problem
Andrew Jaffe wrote: > Hi- > > I've got two Intel OSX machines running matplotlib. > > I recently upgraded one of them to the latest MPL svn. On one machine, > I had some pytz-related problems which I resolved, and I was able to use > it more or less fine. However, when the very first time I started it, > there was a huge pause which I eventually realized had something to do > with the font cache, but it seems OK since then (but perhaps there > should be a warning message when the cache is being built?) > > On the other machine, however, I got the traceback below, which I > eventually traced to the call OSXInstalledFonts() in findSystemFonts(). > Unfortunately, OSXInstalledFonts() is really > OSXInstalledFonts(directory=None, fontext=None) > which then calls > fontext = get_fontext_synonyms(fontext) > which fails with fontext=None. > > I was actually able to fix this by copying the .matplottlib directory > from the working machine, but it's still clearly a bug! Actually, sorry, this *doesn't* fix the problem on machine number 2 (it just lets ipython -pylab start without crashing, but actually calling, e.g., plot(x,y) still fails for the same reason). > > Yours, > > Andrew > > > > Traceback (most recent call last): >File "/Users/jaffe/home/local/bin/ipython", line 8, in > load_entry_point('ipython==0.8.1', 'console_scripts', 'ipython')() >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipapi.py", > > line 356, in launch_new_instance > ses = make_session(user_ns) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipapi.py", > > line 405, in make_session > return IPython.Shell.start(user_ns) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", > > line , in start > return shell(user_ns = user_ns) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", > > line 1008, in __init__ > shell_class=MatplotlibShell) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", > > line 74, in __init__ > debug=debug,shell_class=shell_class) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/ipmaker.py", > > line 95, in make_IPython > embedded=embedded,**kw) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", > > line 562, in __init__ > user_ns,b2 = self._matplotlib_config(name,user_ns) >File > "/Users/jaffe/Library/Python/2.5/site-packages/ipython-0.8.1-py2.5.egg/IPython/Shell.py", > > line 503, in _matplotlib_config > import matplotlib.pylab as pylab >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/pylab.py", > > line 208, in > from matplotlib import mpl # pulls in most modules >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/mpl.py", > > line 3, in > from matplotlib import axis >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/axis.py", > > line 20, in > from font_manager import FontProperties >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", > > line 1129, in > _rebuild() >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", > > line 1120, in _rebuild > fontManager = FontManager() >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", > > line 884, in __init__ > self.ttffiles = findSystemFonts(paths) + findSystemFonts() >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", > > line 254, in findSystemFonts > for f in OSXInstalledFonts(): >File > "/Users/jaffe/Library/Python/2.5/site-packages/matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/font_manager.py", > > line 180, in OSXInstalledFonts > fontext = get_fontext_synonyms(fontext) >
Re: [matplotlib-devel] OSX Font cache problem
OK, the fix in the latest SVN does seem to work. Andrew On 9 Nov 2007, at 13:24, Michael Droettboom wrote: > There is a (probable) fix for this in SVN r4179. I can't get to a > Mac to test right now -- can you please confirm that fixes your > problem? You may need to remove ~/.matplotlibrc/fontManager.cache > (just once) in case the earlier bug has messed up the cache. > > Andrew Jaffe wrote: >> Andrew Jaffe wrote: >>> Hi- >>> >>> I've got two Intel OSX machines running matplotlib. >>> >>> I recently upgraded one of them to the latest MPL svn. On one >>> machine, I had some pytz-related problems which I resolved, and I >>> was able to use it more or less fine. However, when the very >>> first time I started it, there was a huge pause which I >>> eventually realized had something to do with the font cache, but >>> it seems OK since then (but perhaps there should be a warning >>> message when the cache is being built?) > > Perhaps you have a lot of fonts on your system. I see your point > about the warning message, but sometimes when the user is presented > with too much information, they just train themselves to ignore all > of it... > >>> On the other machine, however, I got the traceback below, which I >>> eventually traced to the call OSXInstalledFonts() in >>> findSystemFonts(). Unfortunately, OSXInstalledFonts() is really >>> OSXInstalledFonts(directory=None, fontext=None) >>> which then calls >>> fontext = get_fontext_synonyms(fontext) >>> which fails with fontext=None. >>> >>> I was actually able to fix this by copying the .matplottlib >>> directory >>> from the working machine, but it's still clearly a bug! >> Actually, sorry, this *doesn't* fix the problem on machine number >> 2 (it just lets ipython -pylab start without crashing, but >> actually calling, e.g., plot(x,y) still fails for the same reason). >>> Yours, >>> >>> Andrew >>> >>> >>> >>> Traceback (most recent call last): >>>File "/Users/jaffe/home/local/bin/ipython", line 8, in >>> load_entry_point('ipython==0.8.1', 'console_scripts', >>> 'ipython')() >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/ipapi.py", line 356, in >>> launch_new_instance >>> ses = make_session(user_ns) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/ipapi.py", line 405, in make_session >>> return IPython.Shell.start(user_ns) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/Shell.py", line , in start >>> return shell(user_ns = user_ns) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 1008, in __init__ >>> shell_class=MatplotlibShell) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 74, in __init__ >>> debug=debug,shell_class=shell_class) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/ipmaker.py", line 95, in >>> make_IPython >>> embedded=embedded,**kw) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 562, in __init__ >>> user_ns,b2 = self._matplotlib_config(name,user_ns) >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> ipython-0.8.1-py2.5.egg/IPython/Shell.py", line 503, in >>> _matplotlib_config >>> import matplotlib.pylab as pylab >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/ >>> pylab.py", line 208, in >>> from matplotlib import mpl # pulls in most modules >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/ >>> mpl.py", line 3, in >>> from matplotlib import axis >>>File "/Users/jaffe/Library/Python/2.5/site-packages/ >>> matplotlib-0.90.1_r4176-py2.5-macosx-10.3-fat.egg/matplotlib/ >>> axis.py", line 20, in >>> fr