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