[Grok-dev] Re: Zope 3 error message rage... :)

Tres Seaver tseaver at palladion.com
Sun Jul 8 21:38:38 EDT 2007

Hash: SHA1

Sebastian Ware wrote:
> Two things that I have found difficult. I often get look up errors  
> but it is difficult to understand what went wrong.
> I also hade a "TypeError: unsubscriptable object" when I inserted an  
> extra attirbute in my <html> tag in a page template...
> I try to read the stack trace, but stack traces are tricky. I mean I  
> can se what the offending line is, but it is a lot more difficult  
> understanding why it failed, because it requires me to understand the  
> framework a lot better.
> Maybe the stack trace could tell me more about what the framework was  
> attempting to do when it failed (using doc strings...). Maybe if I  
> could just search on that stack trace pattern to find someone else  
> who has had the same problem. I don't know, but what I do know is  
> that when I get the problem and it isn't trivial, I want to search  
> somewhere first to see if someone has had a similar problem.
> I also know that I feel an urge to make a fresh cup of coffee when I  
> get a look up error, just to be prepared for some serious hours of  
> debugging... :p

You need to learn about the "postmortem publisher" option in zope.conf:
 requests to that port which trigger an exception stop in the pdb
debugger *at the point of the exception*, allowing you to examine the
state of locals, arguments, etc.  E.g., in your zope.conf:

   type PostmortemDebuggingHTTP
   address 8081

- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Grok-dev mailing list