Re: [Zope-dev] Product dev
Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain! import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Product dev
Chris Withers wrote: Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain! import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb That's right. As long as you're in -D mode or you have the event log going somewhere, you'll see these kind of exceptions. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Product dev
Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain! import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb That's right. As long as you're in -D mode or you have the event log going somewhere, you'll see these kind of exceptions. Cool, what version was it fixed in? I'll chop the code out of Squishdot et al as soon as I get the chance :-) cheers, Chris ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Product dev
Chris Withers wrote: Shane Hathaway wrote: when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Does this mean this bit from your average product's __init__.py isn't neeeded anymore? except: # If we can't register, complain! import sys, traceback, string type, val, tb = sys.exc_info() sys.stderr.write(string.join(traceback.format_exception(type, val, tb), '')) del type, val, tb That's right. As long as you're in -D mode or you have the event log going somewhere, you'll see these kind of exceptions. Cool, what version was it fixed in? One of the 2.2.0 betas, I think. Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Product dev
I'm building a Product in Python and seem to be having some issues with the new registerClass method of Product registering. If I build it all fine as noted in Shane's recent HowTo, the product does not show up in the control panel. Then after much other chasing, I make a purposeful syntax error in the code, and the Product shows up to reflect its brokenness and shows me the syntax error. Then when I try to fix the error, and do a restart, the error still shows as if I had not changed the code. I checked _many, many_ times, and now the code is different, but Zope seems not to recognize the changed code in spite of my deletion of the pyc files. TYA, Tim ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Product dev
Tim McLaughlin writes: I'm building a Product in Python and seem to be having some issues with the new registerClass method of Product registering. If I build it all fine as noted in Shane's recent HowTo, the product does not show up in the control panel. Then after much other chasing, I make a purposeful syntax error in the code, and the Product shows up to reflect its brokenness and shows me the syntax error. Then when I try to fix the error, and do a restart, the error still shows as if I had not changed the code. I checked _many, many_ times, and now the code is different, but Zope seems not to recognize the changed code in spite of my deletion of the pyc files. I have seen this several times: For some problems during product import, Zope decides to keep the old state rather than show the error. This is *very* confusing. If you have a sufficiently recent Zope version (I think, at least Zope 2.2.2), then enabling the "stupid logging mechanism" should give you an error indication in the log file. You activate this logging through a parameter: STUPID_LOG_FILE=zope.log for your start script. Dieter ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Product dev
Dieter Maurer wrote: For some problems during product import, Zope decides to keep the old state rather than show the error. I wonder whether the product's version.txt might have something to do with it. Remove version.txt and see if it has any effect. Then try creating a new version.txt. Another thing to watch out for is file permissions. "chmod -R 777 productname" and see if there's any difference. Are you running Zope in "-D" debug mode and watching the output? I can't imagine debugging products in normal mode. Note, however, that Zope 2.1.7 and before don't even show anything in the terminal window when a product has syntax errors. One of the first things I did at Digital Creations was make sure that got fixed. :-) Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )