Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '+++': 0.03; 'static': 0.03; 'diff': 0.05; 'so?': 0.07; '===========': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'jan': 0.11; 'stack': 0.13; '-276,7': 0.16; 'pyobject': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:gui': 0.16; 'subject:run': 0.16; 'trace.': 0.16; '{}"': 0.16; 'wrote:': 0.16; 'char': 0.18; 'integer': 0.18; 'skip:= 10': 0.18; '>>>': 0.20; '+0200': 0.20; 'aug': 0.20; 'tracker': 0.20; '"",': 0.22; 'null;': 0.22; 'skip:= 20': 0.22; 'tkinter': 0.22; 'am,': 0.23; 'import': 0.24; '(most': 0.24; 'patch': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'compatible': 0.27; 'error': 0.27; '+0100': 0.27; 'executing': 0.27; 'this.': 0.28; '---': 0.28; 'improves': 0.29; 'prints': 0.29; 'subject:users': 0.29; 'tcl': 0.29; 'fixed': 0.31; 'skip:_ 10': 0.32; 'traceback': 0.33; 'file': 0.34; 'subject:please': 0.35; 'expected': 0.35; 'skip:p 30': 0.35; 'but': 0.36; 'instead': 0.36; 'there': 0.36; 'apple': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'christian': 0.38; 'someone': 0.38; 'to:addr:python.org': 0.40; 'chance': 0.60; 'more': 0.63; 'here': 0.66; 'skip:= 30': 0.67; '4.2.1': 0.84; '============': 0.84; 'compare:': 0.84; 'darwin': 0.84; 'gollwitzer': 0.84; 'upstream': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Linux users: please run gui tests Date: Sat, 29 Aug 2015 00:48:57 -0400 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-98-114-97-173.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1440823765 news.xs4all.nl 23794 [2001:888:2000:d::a6]:51170 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95752 On 8/28/2015 4:52 AM, Christian Gollwitzer wrote: > Here is a small patch which improves the error message a lot: > diff -ru Python-3.4.3/Modules/_tkinter.c > Python-3.4.3-patched/Modules/_tkinter.c > --- Python-3.4.3/Modules/_tkinter.c 2015-02-25 12:27:45.000000000 +0100 > +++ Python-3.4.3-patched/Modules/_tkinter.c 2015-08-28 > 10:27:15.000000000 +0200 > @@ -276,7 +276,8 @@ > static PyObject * > Tkinter_Error(PyObject *v) > { > - PyErr_SetString(Tkinter_TclError, Tkapp_Result(v)); > + const char *errorInfo = Tcl_GetVar(Tkapp_Interp(v), "errorInfo", > TCL_GLOBAL_ONLY); > + PyErr_SetString(Tkinter_TclError, errorInfo); > return NULL; > } > > > Instead of just the error, this prints the full Tcl stack trace. > > Compare: > =========== before ============ > Apfelkiste:Python-3.4.3 chris$ ./python.exe > Python 3.4.3 (default, Aug 28 2015, 10:33:48) > [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import tkinter; root=tkinter.Tk() > >>> root.eval("grid rowconfigure . 0 -weight {}") > Traceback (most recent call last): > File "", line 1, in > _tkinter.TclError: expected integer but got "" > ============================= > > with > > =========== after ============= > Apfelkiste:Python-3.4.3-patched chris$ ./python.exe > Python 3.4.3 (default, Aug 28 2015, 10:29:50) > [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import tkinter; root=tkinter.Tk() > >>> root.eval("grid rowconfigure . 0 -weight {}") > Traceback (most recent call last): > File "", line 1, in > _tkinter.TclError: expected integer but got "" > while executing > "grid rowconfigure . 0 -weight {}" > >>> > ================================== > > Is there a chance to get this fixed upstream in Tkinter? There might be if someone opened a new tkinter tracker issue for this. Can you do so? -- Terry Jan Reedy