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.<div>
<br></div><div>Item 1: getting a traceback for errors.</div><div><br></div><div>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.)</div>
<div><br></div><div>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.</div><div><br></div><div>
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.</div>
<div><br></div><div>Item 2: leaving off the super call in init</div><div><br></div><div>This is simply a case of RTFM, but I'll note that an error like so::</div><div><br></div><div> AttributeError: 'ObjectName' object has no attribute '_SampleContainer__data'</div>
<div><br></div><div>is a symptom of adding an __init__ method to a Container-subclassing object and not calling the parent's init method with 'super'.</div><div><br></div><div>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.</div>
<div><br></div><div> --jcc</div><div>-- <br>J Cameron Cooper<br><a href="mailto:jccooper@gmail.com">jccooper@gmail.com</a><br><a href="mailto:anything@jcameroncooper.com">anything@jcameroncooper.com</a><br>mobile: 713.882.7395<br>
Skype: jcameroncooper<br>
</div>