[Matplotlib-users] ERROR: _tkinter.TclError: can't invoke "wm" command: application has been destroyed

William Ray Wing wrw at mac.com
Wed Nov 22 16:40:54 EST 2017



Sent from my iPhone

> On Nov 22, 2017, at 4:01 PM, Stephen P. Molnar <s.molnar at sbcglobal.net> wrote:
> 
> I am running up to date Matplotlib in Python3.5 on my Debian Stretch Platform.
> 
> I have not made any changes of which I am aware, but I have started getting errors when running a Python script that I have written to plot data obtained from a FORTRAN program. 
> 

This like a first cousin to the problem you recently posted on the Tutor list.  Do you get the same result if you invoke the script directly from the command line, i.e. 

$python MolT_5IMT_w_3_2_plot.py<return>

And not in iPython or Whatever?

Bill
> Enter Molecule ID: A
> Traceback (most recent call last):
>   File "MolT_5IMT_w_3_2_plot.py", line 83, in <module>
>     fig.savefig(name_plt,bbox_inches='tight')
>   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", line 1814, in savefig
>     self.canvas.print_figure(fname, **kwargs)
>   File "/usr/local/lib/python3.5/dist-packages/matplotlib/backend_bases.py", line 2180, in print_figure
>     self.figure.dpi = dpi
>   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", line 436, in _set_dpi
>     self.set_size_inches(w, h, forward=forward)
>   File "/usr/local/lib/python3.5/dist-packages/matplotlib/figure.py", line 745, in set_size_inches
>     manager.resize(int(canvasw), int(canvash))
>   File "/usr/local/lib/python3.5/dist-packages/matplotlib/backends/backend_tkagg.py", line 540, in resize
>     self.canvas._tkcanvas.master.geometry("%dx%d" % (width, height))
>   File "/usr/lib/python3.5/tkinter/__init__.py", line 1698, in wm_geometry
>     return self.tk.call('wm', 'geometry', self._w, newGeometry)
> _tkinter.TclError: can't invoke "wm" command: application has been destroyed
> 
> 
> ------------------
> (program exited with code: 1)
> Press return to continue
> 
> I have attached the Python script and an input file to this message.
> 
> I would appreciate some assistance in solving this problem
> 
> Thanks in advance.
> -- 
> Stephen P. Molnar, Ph.D.		Life is a fuzzy set
> www.molecular-modeling.net		Stochastic and multivariate
> (614)312-7528 (c)
> Skype: smolnar1
> <MultiplePlots_3.py>
> <A_P>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20171122/7e9fa713/attachment-0001.html>


More information about the Matplotlib-users mailing list