errorbar and legend(loc='best') gives error

When errorbar() and legend(loc=‘best’) are used an error message appears. But other legend locations (e.g. ‘upper left’ or ‘upper right’) work fine.
pylab.figure()
pylab.errorbar(xdata,ydata,z*y_standardError,fmt=‘o-’,label=‘test’)
pylab.legend(loc=‘best’)
pylab.show()

Exception in Tkinter callback
Traceback (most recent call last):
File “C:\Python25\lib\lib-tk\Tkinter.py”, line 1403, in call
return self.func(*args)
File “C:\Python25\Lib\site-packages\matplotlib\backends\backend_tkagg.py”, line 188, in resize
self.show()
File “C:\Python25\Lib\site-packages\matplotlib\backends\backend_tkagg.py”, line 191, in draw

FigureCanvasAgg.draw(self)
File “C:\Python25\Lib\site-packages\matplotlib\backends\backend_agg.py”, line 358, in draw
self.figure.draw(self.renderer)
File “C:\Python25\Lib\site-packages\matplotlib\figure.py”, line 624, in draw
for a in self.axes: a.draw(renderer)
File “C:\Python25\Lib\site-packages\matplotlib\axes.py”, line 1345, in draw
a.draw(renderer)
File “C:\Python25\Lib\site-packages\matplotlib\legend.py”, line 236, in draw
self._update_positions(renderer)
File “C:\Python25\Lib\site-packages\matplotlib\legend.py”, line 579, in _update_positions
ox, oy = self._find_best_position(w, h)
File “C:\Python25\Lib\site-packages\matplotlib\legend.py”, line 463, in _find_best_position
verts, bboxes, lines = self._auto_legend_data()
File “C:\Python25\Lib\site-packages\matplotlib\legend.py”, line 378, in _auto_legend_data
hlines = handle.get_lines()
AttributeError: LineCollection instance has no attribute ‘get_lines’

···

Looking for last minute shopping deals?
Find them fast with Yahoo! Search.