Hi, On Mon, 17 Jul 2017 15:02:04 +0530 niraj pandey <nirajkumarpan...@gmail.com> wrote:
> Hi , > > I am getting the error while running one of my python script. > > import matplotlib.pyplot as plt > plt.plot([1,2,3,4]) > plt.ylabel('some numbers') > plt.show() I don't know about matplotlib, but this code snippet works here. > Error: > > raceback (most recent call last): > File "test.py", line 4, in <module> > plt.show() > File > "/grid/common/pkgs/python/v2.7.2/lib/python2.7/site-packages/matplotlib/pyplot.py", > line 253, in show > return _show(*args, **kw) > File > "/grid/common/pkgs/python/v2.7.2/lib/python2.7/site-packages/matplotlib/backend_bases.py", > line 163, in __call__ > manager.show() > File > "/grid/common/pkgs/python/v2.7.2/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py", > line 610, in show > self.canvas.manager.window.attributes('-topmost', 1) > File > "/grid/common/pkgs/python/v2.7.2/lib/python2.7/lib-tk/Tkinter.py", line > 1493, in wm_attributes return self.tk.call(args) > _tkinter.TclError: wrong # args: should be "wm attributes window" This looks strange, since the call to attributes() seems to be fine. I can only guess here. You are apparently using a custom python version, how do you start the program? Is it possible that somehow the system default python install conflicts with your custom python here? (Not sure if this could cause an error like this at all, though.) Maybe for a test you could try to comment out line 610 in backend_tkagg.py and see what happens then? Regards Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. If some day we are defeated, well, war has its fortunes, good and bad. -- Commander Kor, "Errand of Mercy", stardate 3201.7 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss