error in TkAgg

When I tried to save a plot from the TkAgg GUI, it gave me an error message, here’s the whole sesssion

from pylab import *
x = arange(1, 10, 1)
y = sin(x)
plot(x, y)
[<matplotlib.lines.Line2D instance at 0x017A6DC8>]


then after I click save on the GUI, I get this error message

Exception in Tkinter callback
Traceback (most recent call last):
File “C:\Python24\lib\lib-tk\”, line 1345, in call
return self.func(*args)
File “C:\Python24\Lib\site-packages\matplotlib\backends\”, lin
e 635, in save_figure
self.canvas.print_figure(fname, dpi=300)
File “C:\Python24\Lib\site-packages\matplotlib\backends\”, lin
e 183, in print_figure

agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
File “C:\Python24\Lib\site-packages\matplotlib\backends\”, line
469, in print_figure
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 36-37: ord
inal not in range(128)

Any ideas how to fix that?

thanks in advance,


Yahoo! Photos

Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.