Occasional error when closing all matplotlib windows in an ipython console

236 views
Skip to first unread message

David

unread,
Nov 12, 2012, 10:42:08 PM11/12/12
to spyd...@googlegroups.com
When I close all matplotlib windows from an ipython console using the following command

plt.close("all")

I occasionally get the following error, but it's not very reproducible:

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_qt4.py", line 156, in <lambda>
    lambda: self.close_event())

  File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 1564, in close_event
    self.callbacks.process(s, event)

RuntimeError: wrapped C/C++ object of %S has been deleted

I am using spyder 2.2.0dev, matplotlib 1.1.1, Qt 4.8.2 via PyQt4 (API v2) 4.9.3

I'm not sure whether this is a spyder issue or a matplotlib issue. Has anybody else noticed this?

Carlos Córdoba

unread,
Nov 14, 2012, 1:16:59 PM11/14/12
to spyd...@googlegroups.com
Hi David,

I have a couple of questions for you:

1. Do you see the same behavior while you're using the Python console?

2. Which version of IPython are you using?

Cheers,
Carlos

El 12/11/12 22:42, David escribió:
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/WT2AyCOL2qkJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

David

unread,
Nov 15, 2012, 5:22:44 PM11/15/12
to spyd...@googlegroups.com
Hi Carlos,

I'm using Ipython 0.13.1. I don't use the regular python console any more, so I don't know if the problem occurs there. Because it's quite a rare problem I'd have to use the regularly in order to see the error. I'll try switching over to the regular console for a while and see if the error occurs there.

cheers
David

David

unread,
Nov 18, 2012, 9:05:44 PM11/18/12
to spyd...@googlegroups.com
Hello Carlos,

I can confirm that the problem also happens with the regular python console, so I guess it's not an IPython issue.

cheers
David

David

unread,
Nov 20, 2012, 5:42:47 PM11/20/12
to spyd...@googlegroups.com
I can now reproduce this reliably, and it also happens outside of spyder, so I guess it's a problem with matplotlib.

Carlos Córdoba

unread,
Nov 21, 2012, 11:03:07 AM11/21/12
to spyd...@googlegroups.com
Thanks David for digging into it. Maybe an upgrade to the newly released matplotlib 1.2 could solve the problem for you?

Cheers,
Carlos

El 20/11/12 17:42, David escribió:
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/49ycHB5-MvsJ.
Reply all
Reply to author
Forward
0 new messages