cabraut <cabraut@...> writes:

> 
> 
> Dear Jakob and Ben, 
> 
> I am seeing the same error.  This is with a clean install of Python 2.7,
> numpy 1.6.1, and matplotlib 1.0.1 (all 32-bit versions running under a Win 7
> 64-bit OS).  In fact, all I am doing to test this is to execute the
> 'embedding_in_tk.py' example that is on the examples web page, with the
> button calls at the end of the script uncommented.  Any attempt to use that
> 'Quit' button causes the NULL tstate error.
> 
> Any info on this would be appreciated.  I'm not saying I'm an expert, but
> given that this isn't working "out of the box," it appears to be a bug.
> 
> Chad
> 
> Benjamin Root-2 wrote:
> > 
> > On Wed, Aug 3, 2011 at 3:50 AM, Jakob123
> > <jakob.gleissl@...>wrote:
> > 
> >>
> >> Hej there!
> >> I am using PyPlot to draw onto a Tkinter GUI (in Python 2.6). Works fine,
> >> but when I close the window (root.destroy()) PyPlot apparently crashes
> >> with
> >> the error message "Fatal Python error: PyEval_RestoreThread: NULL tstate"
> >> (error 0x40000015). 
> >>
> >>
> > Jakob,
> > 
> > A little while back, we put out an important v1.0.1 release that addressed
> > many issues with the various backends.  While I don't remember all of the
> > bugs it fixed, it may have fixed that one.  I would suggest installing
> > that
> > version and seeing if it work for you.
> > 
> > Ben Root
> > 
> > 
> > 
> 


Hi,

I've been having the same problem  and it has been driving me crazy that I
couldn't find a solution for the situation when you want to close the main
window using the X Button at the top right corner. Finally I managed to get it
working by using:

def _quit():
    gui.quit()
    gui.destroy()

if __name__=='__main__':
        root=Tk()
        root.protocol('WM_DELETE_WINDOW',_quit)
        root.mainloop()





------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to