[Zope] Uncaptured python exception
I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Jon ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
- Original Message - From: Jon Emmons [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, May 31, 2007 9:58 AM Subject: [Zope] Uncaptured python exception I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Zope 2.9.x requires python 2.4.2 or 2.4.3 Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Oops, my bad. Python is 2.4.4. (not 3.4) perhaps my python needs to be moved back a bit. I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 10:07 AM To: Jon Emmons; zope@zope.org Subject: Re: [Zope] Uncaptured python exception - Original Message - From: Jon Emmons [EMAIL PROTECTED] To: zope@zope.org Sent: Thursday, May 31, 2007 9:58 AM Subject: [Zope] Uncaptured python exception I am using zope 2.9, python 3.4. when I have a bug in my python I get Uncaptured Python Exception coming from zope. This is a nightmare. I have spent hours trying to trace down the simplest typos that would have been instantly reported in any other development environment. How do I get zope to Capture these exceptions? I just want to know what line the error occurred in! Anything at all would be helpful! Do I need a different version of zope or python? Perhaps a python module? Zope 2.9.x requires python 2.4.2 or 2.4.3 Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
On 5/31/07, Jon Emmons [EMAIL PROTECTED] wrote: I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) This just means that the browser disconnected before the request was completely sent. In other words, the user used the Stop button. Nothing to worry about. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Thanks all for your help. I guess I was worried about nothing. Previous versions of zope did not generate those messages. I thought it was why I was getting no zope error at all with runtime errors. I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Jon -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 10:25 AM To: Jon Emmons; 'Jonathan'; zope@zope.org Subject: RE: [Zope] Uncaptured python exception --On 31. Mai 2007 10:12:35 -0400 Jon Emmons [EMAIL PROTECTED] wrote: Oops, my bad. Python is 2.4.4. (not 3.4) perhaps my python needs to be moved back a bit. I don't get any error in the error log from the zope admin, just this cryptic msg from the window that zope is running in. 2007-05-31 09:48:49 ERROR ZServer uncaptured python exception, closing channel ZServer.HTTPServer.zhttp_channel connected 206.246.160.45:20916 at -0x49709f74 channel#: 202 requests: (socket.error:(104, 'Connection reset by peer') [/usr/local/lib/python2.4/asynchat.py|initiate_send|219] [/home/zope/zope/lib/python/ZServer/medusa/http_server.py|send|417] [/usr/local/lib/python2.4/asyncore.py|send|332]) This indicates that the client closed the connection before completing the request. Not a Zope issue - it's in fact no issue. -aj ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
--On 31. Mai 2007 11:06:17 -0400 Jon Emmons [EMAIL PROTECTED] wrote: Thanks all for your help. I guess I was worried about nothing. Previous versions of zope did not generate those messages. Nonsense. Such error messages are shown by Zope since ages. I thought it was why I was getting no zope error at all with runtime errors. I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. What's the point? There is nothing to worry about. Your client closes the connection and Zope reacts with throwing an exception. There is nothing else Zope could do - either you catch the exception and swallow it or it won't catch the exception...so what's your *real* problem with the behavior? -aj pgpfbvdN0OjUG.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
- Original Message - From: Jon Emmons [EMAIL PROTECTED] To: 'Andreas Jung' [EMAIL PROTECTED]; 'Jonathan' [EMAIL PROTECTED]; zope@zope.org Sent: Thursday, May 31, 2007 11:06 AM Subject: RE: [Zope] Uncaptured python exception I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. Syntax errors for external methods can also be found by clicking on the 'Save Changes' button of the external method object when in the ZMI. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Referring to non-existent python variables (eg. the mistyping you described above) should raise a KeyError. Do you have any try/except statements in your external method which may be capturing the errors? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Sometimes, I do get those errors. But if I take a working piece of python and stick in a sabotage statement like: Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. Jon -Original Message- From: Jonathan [mailto:[EMAIL PROTECTED] Sent: Thursday, May 31, 2007 11:15 AM To: Jon Emmons; zope@zope.org Subject: Re: [Zope] Uncaptured python exception - Original Message - From: Jon Emmons [EMAIL PROTECTED] To: 'Andreas Jung' [EMAIL PROTECTED]; 'Jonathan' [EMAIL PROTECTED]; zope@zope.org Sent: Thursday, May 31, 2007 11:06 AM Subject: RE: [Zope] Uncaptured python exception I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. Syntax errors I can find by simply importing the external method into the python interpreter. Syntax errors for external methods can also be found by clicking on the 'Save Changes' button of the external method object when in the ZMI. But dealing with the form variables, I will often have runtime errors that give no message at all. So I find myself putting little I am here print messaged throughout my code to try to zone in on where I mistyped the variable equipment_num as equipment_mun. Referring to non-existent python variables (eg. the mistyping you described above) should raise a KeyError. Do you have any try/except statements in your external method which may be capturing the errors? Jonathan ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. So how do you know there is a failure then? There is really nothing in event.log and nothing in error_log? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Uncaptured python exception
The example 'var1 = var2' should cause the NameError exception. NameError: name 'var2' is not defined You might want to check your 'error log' objects for the error messages. If you don't have an error log object, it might be a good idea to create one. On 5/31/07, Maciej Wisniowski [EMAIL PROTECTED] wrote: Var1 = var2 Where var2 is undefined (i.e. has never been assigned anything) Just silent failure. No error. So how do you know there is a failure then? There is really nothing in event.log and nothing in error_log? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Thanks, Derek Wilson ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Uncaptured python exception
Jon Emmons wrote at 2007-5-31 11:06 -0400: ... I still don't know why python errors will just quietly cause things to fail with no zope error at all. Nothing... That may be something I just have to live with. Very difficult to debug and develop with though. This is a *very* unusual behaviour of Zope. I have never seen it (or heard about it before your post). I know of only a single problem where Zope does not reliably report problems: when a product cannot be imported during startup, then the only hint may be in Zope's logfile -- especially, the product may not seem to be broken in Control_Panel -- Product management. But that is definitely not your problem. Syntax errors I can find by simply importing the external method into the python interpreter. But dealing with the form variables, I will often have runtime errors that give no message at all. I fear somehow you have screwed up your Zope. It behaves differently from how we know it. To be sure: you look into the error_log object in the ZMI, have removed any exceptions to be ignored and nevertheless do not see any error log messages there? -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )