SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Gerhard V. <s.v...@nt...> - 2004年06月30日 13:44:10
Hi
I have just installed matplotlib and Python 2.3.3 for Windows (Enthought 
Edition) on Win XP. Then I ran the sample at:
http://matplotlib.sourceforge.net/screenshots/simple_plot.py. It caused 
the traceback below, related to the ttfcache
I have tried:
1. Created a System Environment variable called ttfcache that points to 
C:\Documents and Settings\gventer\Local Settings\Application Data
(which is where the Windows font cache file IconCache.db is)
2. Created a folder in %USERPROFILE%\\.ttffont.cache - (that is 
C:\Documents and Settings\gventer\.ttffont.cache)
Every time I still get:
Traceback (most recent call last):
 File "C:\myscripts\simple_plot.py", line 1, in ?
 from matplotlib.matlab import *
 File "C:\PYTHON23\Lib\site-packages\matplotlib\matlab.py", line 133, in ?
 from axes import Axes
 File "C:\PYTHON23\Lib\site-packages\matplotlib\axes.py", line 10, in ?
 from axis import XTick, YTick, XAxis, YAxis
 File "C:\PYTHON23\Lib\site-packages\matplotlib\axis.py", line 20, in ?
 from font_manager import FontProperties
 File "C:\PYTHON23\Lib\site-packages\matplotlib\font_manager.py", line 
944, in ?
 fontManager = FontManager()
 File "C:\PYTHON23\Lib\site-packages\matplotlib\font_manager.py", line 
790, in __init__
 pickle.dump(self.ttfdict, file(ttfcache, 'w'))
IOError: [Errno 2] No such file or directory: 
'%USERPROFILE%\\.ttffont.cache'
What else could I try?
Thanks
Gerhard
From: Gerhard V. <s.v...@nt...> - 2004年06月30日 14:47:16
To answer my own question - I commented out line 790 in font_manager.py:
#pickle.dump(self.ttfdict, file(ttfcache, 'w'))
This fixed it for me
Gerhard
Gerhard Venter wrote:
> 790, in __init__
> pickle.dump(self.ttfdict, file(ttfcache, 'w'))
> IOError: [Errno 2] No such file or directory: 
> '%USERPROFILE%\\.ttffont.cache'
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /