[Grok-dev] rookie Grokker notes

J. Cameron Cooper jccooper at gmail.com
Fri Feb 26 00:28:00 EST 2010

I'm a long-time Zope/Plone guy, but I'm starting my first real project with
Grok. I figured I'd publicly document problems I've had getting started;
hopefully they can be fixed and avoided, and at least they'd be
discoverable. I'm not exactly a naive user, but I do have fresh eyes, so
probably I can be of some help streamlining new developer startup.

Item 1: getting a traceback for errors.

Default config is to show a simple "system error" message. Unlike Zope 2,
tracebacks are not shown on the console, nor--so far as I can tell--in the
logs. (I'm not entirely certain about the Grok logging system, so tell me if
I'm wrong; but, none of the log files extant had anything.)

You can get a TTW traceback if running the debug.ini. This is, however, not
easy. Requires a config change and a re-buildout. Also, it still doesn't go
to the console or logs.

I would recommend adding a script or adding an option to an existing script
to run with debug.ini instead of deploy.ini. There's a shortcut for the
debug console, so it's not without precedent. In fact, this is what thought
PROJECTNAME-debug would do.

Item 2: leaving off the super call in init

This is simply a case of RTFM, but I'll note that an error like so::

  AttributeError: 'ObjectName' object has no attribute

is a symptom of adding an __init__ method to a Container-subclassing object
and not calling the parent's init method  with 'super'.

I don't know if there's a way to fix that or at least make the error
clearer, but it would help fools like me if there were.

J Cameron Cooper
jccooper at gmail.com
anything at jcameroncooper.com
mobile: 713.882.7395
Skype: jcameroncooper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20100225/0f79c61b/attachment.html 

More information about the Grok-dev mailing list