|
From: John H. <jdh...@ac...> - 2005-10-21 12:51:08
|
>>>>> "Handzsuj," == Handzsuj, Thomas <Tho...@dr...> writes:
Thomas> Hi, I am trying to use matplotlib 0.84 with Python
Thomas> 2.4.2 on Wondows XP with idle -n. I did this in the
Thomas> past with the 2.3.5 and some older version of
Thomas> matplotlib without any problems.
Thomas> Now I have some problems. I started with a really fresh
Thomas> installation of Python and added first the Numeric 23.8
Thomas> module. After that I installed matplotlib 0.84 and
Thomas> changed the matplotlibrc (tk.pythoninspect : True).
On or around line 451 in font_manager.py, try replacing the part of
the code that loads the fonts with the following block
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 %s"%fpath)
continue
Here we explictly catch the unicode error and move on.
Before rerunning your code, remove your ttffont.cache
If you don't know where your font cache is, use the windows search
tool to find it.
JDH
|