Debugging help wanted for really weird ZClass problem
I need some debugging help with a problem I've had with 2.4 and ZClasses. I have been completely unsuccessful in tracking this one down so I can reproduce it and file a proper bug report on it. Specifically, while developing ZClasses (occasionally deleting and recreating them, i.e. to change base classes), I will often get to a point where I get a traceback ending in NameError: global name 'ClassName' is not defined I'm using the default constructor DTML method in this case, although a python script yields the same error. I thought I had this trapped in the wild, as I backed up Data.fs with the broken behavior, then exported the ZClass products this particular one depended on, made a new Data.fs, and reimported them. They worked. So then I restored the old Data.fs and it was suddenly working (no amount of packing, restarting, or cleanGlobals-ing could get me this far before, but somehow backing up and restoring Data.fs did...?) I'm really stumped here. Anyone have a clue or three? I'm willing to do some debug legwork if I can catch it again... -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
Got the traceback again today. Here it is: Traceback (innermost last): File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 187, in publish File /export/home/b14741/Zope_Dev/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: DevRequest_factory) File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 171, in publish File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: DevRequest_add) File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: DevRequest_add) File /export/home/b14741/Zope_Dev/lib/python/OFS/DTMLMethod.py, line 195, in __call__ (Object: DevRequest_add) File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__ (Object: DevRequest_add) File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: DevRequest.createInObjectManager(REQUEST['id'], REQUEST)) File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: DevRequest.createInObjectManager(REQUEST['id'], REQUEST)) (Info: REQUEST) File <string>, line 2, in f (Object: guarded_getitem) NameError: global name 'DevRequest' is not defined In this case, DevRequest is my ZClass. ---- DevRequest_addForm <dtml-var manage_page_header> <dtml-var expr="manage_form_title(this(), _, form_title='Add Development Request')"> <form action="DevRequest_add" method="post"> <table> <tr><th align="left">Id</th><td><input name="id" size="35"></td></tr> <tr><th align="left">Title</th><td><input name="title" size="35"></td></tr> <tr><th align="left">Text</th><td><textarea name="text" cols="35" rows="6"></textarea></td></tr> <tr><td></td><td><input type="submit" value=" Add "></td></tr> </table> <input name="date" type="hidden" value="&dtml-ZopeTime;"> </form> <dtml-var manage_page_footer> ---- DevRequest_add <dtml-with "DevRequest.createInObjectManager(REQUEST['id'], REQUEST)"> <dtml-call "propertysheets.metadata.manage_editProperties(REQUEST)"> </dtml-with> <dtml-if DestinationURL> <dtml-call "RESPONSE.redirect(DestinationURL+'/manage_workspace')"> <dtml-else> <dtml-call "RESPONSE.redirect(URL2+'/manage_workspace')"> </dtml-if> ---- I have a complete backup of my Zope install now that has the nonfunctional ZClass. Can anyone help, suggest some steps to take, etc.? -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
participants (1)
-
Matt Behrens