Azitech

Azimout's Linux weblog

Matplotlib font manager error

leave a comment »

A Python script that used to work on my machine stopped working at some point. It’s the script presented in the post Designing a Butterworth low-pass filter with SciPy. The last few lines of the traceback were:

File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1306, in findfont
   if not os.path.exists(font):
 File "/usr/lib/python2.7/genericpath.py", line 18, in exists
   os.stat(path)
 TypeError: coercing to Unicode: need string or buffer, dict found

Through this thread I was able to resolve the issue by clearing matplotlib’s font cache: rm ~/.matplotlib/fontList.cache

About these ads

Written by azimout

01/09/2011 at 13:03

Posted in Problems

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: