From nirajkumarpandey at gmail.com Mon Jul 17 05:32:04 2017 From: nirajkumarpandey at gmail.com (niraj pandey) Date: Mon, 17 Jul 2017 15:02:04 +0530 Subject: [Tkinter-discuss] tkinter issue while using matplotlib module.. Message-ID: 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() Error: raceback (most recent call last): File "test.py", line 4, in 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" System Architecture: uname -a Linux noi-niraj 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux RHEL6.0-2013-x86_64 Python: 2.7.2 Can someone please help me here. Best regards Niraj -- Success occurs when opportunity and preparation meet -------------- next part -------------- An HTML attachment was scrubbed... URL: From Cameron at phaseit.net Wed Jul 19 18:15:58 2017 From: Cameron at phaseit.net (Cameron Laird) Date: Wed, 19 Jul 2017 22:15:58 +0000 Subject: [Tkinter-discuss] tkinter issue while using matplotlib module.. Message-ID: <20170719221558.GA30536@lairds.us> niraj pandey has tried to submit a question to the list. Apparently I misconfigured something, be- cause it's not showing up promptly. While I correct my error, I transcribe niraj's request here: > 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() > > > > Error: > > raceback (most recent call last): > File "test.py", line 4, in > 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" > > > System Architecture: > > uname -a > Linux noi-niraj 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC > 2014 x86_64 x86_64 x86_64 GNU/Linux > > RHEL6.0-2013-x86_64 > > Python: 2.7.2 > > Can someone please help me here. > > Best regards > Niraj From klappnase at web.de Fri Jul 21 14:41:43 2017 From: klappnase at web.de (Michael Lange) Date: Fri, 21 Jul 2017 20:41:43 +0200 Subject: [Tkinter-discuss] tkinter issue while using matplotlib module.. In-Reply-To: References: Message-ID: <20170721204143.39383bb43b7f695b62fd3942@web.de> Hi, On Mon, 17 Jul 2017 15:02:04 +0530 niraj pandey 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 > 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