Thanks for the advice! The hack suggested by Peter works fine - even though I still get warnings when I use diifferent commands. I am very happy to see nice looking plots coming on my screen!
The extra line in the hack suggested by John brings back the problem (causing an error).
Best
Erik
On Fri Mar 10 17:05 , John Hunter sent:
···
pykem@…1034… wrote …
When I try to import pylab, I get the error message shown
below. I also tried the earlier version of matplotlib
(matplotlib-0.87.win32-py2.3) with the same result. File
“C:\Python23\Lib\site-packages\matplotlib\font_manager.py”,
line 456, in createFontDict warnings.warn("Cannot handle
unicode filenames %s"%fpath)
So, it looks like what’s happening is that Matplotlib is
trying to cache your font files, and as it does so, it’s
encountered a font whose filename has unicode characters in
it. This is not a problem in and of itself, and it just
The irony is that warning comes in unicode exception handling
Try replacing that block of code with
try:
font = ft2font.FT2Font(str(fpath))
except RuntimeError:
warnings.warn(“Could not open font file %s”%fpath)
continue
except UnicodeError:
warnings.warn(“Cannot handle unicode filenames”)
print >> sys.stderr, ‘Bad file is’, fpath
continue
JDH
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel\?cmd=lnk&kid=110944&bid=241720&dat=121642
Matplotlib-users mailing list