On Sat, Oct 22, 2011 at 7:54 AM, Rich Shepard <rshep...@appl-ecosys.com> wrote: > On Fri, 21 Oct 2011, Paul Ivanov wrote: > I will certainly add diagnostic code requested by you, Ben, and anyone > else and report the results when trying to run the model. I do need to fix > this and have no idea what's behind the problem.
The traceback is due to a nonprinting character being included in one of the fonts on your system - we just need to figure out which one. Change my request to add 'sys.stderr.write(fh.name)' before the 'while 1:' in _parse_char_metrics - just so we don't have any buffering issues. The last file you see printed there will be the one that's causing the issue. You can then try removing it, or sending it back to the list (or both) so we can see what happened. The other issue you're seeing ("unknown keyword in AFM header") is also likely caused by bad font files. >From your error log that Ben forwarded to the list - I'm a bit suspicious that two of the errors came from an afm file that ships with matplotlib, in particular matplotlib-error-trace.txt starts off with: FILENAME: /usr/lib/python2.6/site-packages/matplotlib/mpl-data/fonts/afm/pagko8a.afm Found an unknown keyword in AFM header (was Underline) Found an unknown keyword in AFM header (was Underline) This shouldn't be the case, as I can verify that the keywords aren't just Underline - they are as follows: $ grep Under matplotlib/mpl-data/fonts/afm/pagko8a.afm UnderlinePosition -100 UnderlineThickness 50 and that particular file has not been change in matplotlib since February of 2007 So my wild guess is that something changed your afm files. Can you check that your pagko8a.afm matches the one in https://raw.github.com/matplotlib/matplotlib/master/lib/matplotlib/mpl-data/fonts/afm/pagko8a.afm - and if they don't match, check that using the original pagko8a.afm makes at least that error go away? As another possible solution (maybe this is already done, but worth a potshot), you could try switching USE_FONTCONFIG to True in font_manager.py as per the docstring there: Experimental support is included for using `fontconfig` on Unix variant platforms (Linux, OS X, Solaris). To enable it, set the constant ``USE_FONTCONFIG`` in this file to ``True``. Fontconfig has the advantage that it is the standard way to look up fonts on X11 platforms, so if a font is installed, it is much more likely to be found.) best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users