I'm getting a strange error when multiple figures are created *without a
call to show*. Here's the traceback:

Traceback (most recent call last):
  File
"/Users/Tony/python/devel/mpl/lib/matplotlib/backends/backend_qt4.py", line
151, in <lambda>
    lambda: self.close_event())
  File "/Users/Tony/python/devel/mpl/lib/matplotlib/backend_bases.py", line
1564, in close_event
    self.callbacks.process(s, event)
AttributeError: 'FigureCanvasQTAgg' object has no attribute 'callbacks'


Here's a simple test case:

import matplotlib.pyplot as plt
fig = plt.figure()
plt.plot([0, 1])
fig = plt.figure()
plt.plot([0, 1])


This issue appears in versions after the PR to fix the Qt4 close
bug<https://github.com/matplotlib/matplotlib/pull/716>.
The error occurs even without the `plot` calls, but the failures aren't as
consistent (the error will randomly disappear).

Note that sticking a call to `plt.show()` at the end and then manually
closing the figures does not seem to produce this error. I'm having a
difficult time locating the source of the bug: when I stick a pdb trace in
the code, the error doesn't get raised.

Can anyone reproduce this issue?

-Tony
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to