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

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


-----BEGIN PGP SIGNED MESSAGE-----
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:

  <server>
   type PostmortemDebuggingHTTP
   address 8081
  </server>



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

iD8DBQFGkZGe+gerLs4ltQ4RApM3AJ4zsr00K3p55OdUP/w6DEMqWm2Q7QCfX65t
u1R64uG3zwadrxHPPl6ixi8=
=bQ6H
-----END PGP SIGNATURE-----



More information about the Grok-dev mailing list