Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.030 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'read.': 0.03; 'debugging': 0.07; 'framework.': 0.09; 'instance.': 0.09; 'part,': 0.09; 'seemed': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; 'jan': 0.12; '"code': 0.16; 'boundary.': 0.16; 'code?': 0.16; 'fallback.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'opposite': 0.16; 'subject:post': 0.16; 'those,': 0.16; 'typo': 0.16; 'url:openerp': 0.16; 'exception': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'library': 0.18; 'drawing': 0.19; 'code,': 0.22; 'cc:addr:python.org': 0.22; 'gateway': 0.24; 'recognize': 0.24; 'fine': 0.24; 'helpful': 0.24; '(or': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'second': 0.26; 'somewhere': 0.26; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; 'point': 0.28; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'posting': 0.31; 'ball': 0.31; 'boundary': 0.31; 'though.': 0.31; 'probably': 0.32; 'figure': 0.32; 'languages': 0.32; 'up.': 0.33; 'framework': 0.33; 'fri,': 0.33; 'actual': 0.34; "i'd": 0.34; 'subject: (': 0.35; "can't": 0.35; 'advice': 0.35; 'common': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'options:': 0.36; 'useful': 0.36; 'two': 0.37; 'area': 0.37; 'pm,': 0.38; 'quote': 0.39; 'though,': 0.39; 'enough': 0.39; 'either': 0.39; 'even': 0.60; 'skip:u 10': 0.60; 'tell': 0.60; 'helps': 0.61; "you're": 0.61; 'first': 0.61; 'back': 0.62; 'save': 0.62; 'field': 0.63; 'happen': 0.63; 'more': 0.64; 'love': 0.65; 'great': 0.65; 'url:blogspot': 0.65; 'side': 0.67; 'between': 0.67; 'url:help': 0.67; 'helping': 0.70; 'analysis': 0.75; 'yourself': 0.78; 'ps.': 0.84; 'reading,': 0.84; 'rexx,': 0.84; "site's": 0.84; 'subject:Value': 0.84; 'subject:read': 0.84; 'superb': 0.91; 'thoroughly': 0.91; 'trouble.': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=3Z6AUrE2q3I2kOUlnSl+53pZayNAIhHx67CoddsWn2k=; b=v1dOuO4G74Z6IKODdGWy7S1dYxQUyEpuYY6haD9zUTFBY0QP1oG6NDlH8akkMnMC7W X9yQykBGpx+qpM6kbD4+lcSJ6haptZjo3Lp1M6MS0+R7QUhohWk7UVJ8IxbAb5wg3LEv oQV+hJi/Nxwkts4VJaWx8GEzX6nxj6hCTSPk4kGqxjVQHwmRex7XMwsKmOxBSLo9tpC1 XiRVfebPrCyIN755woBpNKE3VmDj7F2QJ2AwWtRGFoUC15PIu55xtib/mHobNyeGYM1M G5zvUty+5L/qdA5SW5WuyKQnJmyuiYJ0StqmNAYjj+zkwyomImbYf2JqpqBunaUKQQR0 fPZQ== MIME-Version: 1.0 X-Received: by 10.68.133.6 with SMTP id oy6mr19602867pbb.153.1388730628136; Thu, 02 Jan 2014 22:30:28 -0800 (PST) In-Reply-To: References: Date: Fri, 3 Jan 2014 17:30:28 +1100 Subject: Re: How to read and post tracebacks (was Registry Key Value Help) From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388730642 news.xs4all.nl 2829 [2001:888:2000:d::a6]:58001 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63039 On Fri, Jan 3, 2014 at 4:16 PM, Rustom Mody wrote: > Something like this is what I had in mind > http://help.openerp.com/question/9704/how-to-read-and-understand-errors-from-tracebacks/ > Hrm, site's having trouble. First time I tried it, it came back with a gateway timeout. Seemed to work second time, though, so now I have the content up. That sort of thing is fine when you're working with a very specific framework. (Look at point 6, for instance. Knowing the boundary between "code we trust because it's really thoroughly tested" and "code that might be the cause of the bug" means knowing what the framework is, usually.) If you understand the code enough to pinpoint the problem, you probably know enough to fix the problem, and if you don't, you can save yourself a lot of analysis by just posting the whole traceback for someone else to read. So while that advice may be helpful on that site's forum, for the general field of python-list it's probably more useful to just tell people to quote the whole traceback, and then we can figure things out. That's the "advice for python-list" part, though. What about the opposite side of that - helping people to understand their own code? Well, it's what I said in the parens about knowing the boundary. This is completely language-independent now; I had the same thing come up in REXX, the same thing will happen if you're debugging something in gdb, and it happens to me all the time in Pike. In all four languages it's common for the actual exception (or signal, in the case of gdb) to emanate from somewhere below user code. So there are two options: Either get so familiar with the library code that you recognize where to stop reading, or get so familiar with the code you're debugging that you recognize where to start reading. The first one is great for users-helping-users forums, the second is superb for your own code :) And if you can't do either of those, a crystal ball helps alot; chances are an expert can go to the right area even without knowing the code, just by what "looks right" and what "looks wrong". A handy fallback. ChrisA PS. I left a typo in there because I'd love to see a drawing of a crystal ball helping Alot. http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html