RE: [Zope] No stack trace returned on XMLRPC call
-----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Friday, 30 August 2002 3:15 AM To: djay@avaya.com Cc: 'zope@zope.org' Subject: RE: [Zope] No stack trace returned on XMLRPC call
Jay, Dylan writes:
... This post wasn't really about that however, I was more asking if anyone knew why no strack trace was being returned for the XMLRPC call, when under normal circumstances it is? Should I raise a bug for this? In Zope before 2.6, stack traces are badly integrated -- outside of the HTML tag. Many people complain that they are shown at all (because of security/privacy concerns).
It is quite natural that in the normal case (unless you are debugging),
I AM DEBUGGING (-D option is ON!). Is this a bug, yes or no?
XML-RPC responses should not contain track traces as the XML-RPC client can not do much with them.
I think, with Zope 2.6, you can much better control what happens with exceptions and the associated stack traces, at least for normal HTTP requests (not sure about XML-RPC, but hopefully there, too). You should be able to log the stack traces on the server and analyse them in the servers log file.
Yes, I'm awaiting this earerly. No win32 binary yet however.
I AM DEBUGGING (-D option is ON!).
Your caps lock key is on. That can cause all kinds of problems, including snide and unhelpful answers like this one. Take a deep breath and count to ten. Unless you are paying for support you have no justification to get upset at Zope, XML-RPC, or anyone on the list. If you want to get angry go pay the nice folks at Zope.com and they'll be happy to listen to your shouting.
Jay, Dylan writes:
... no stack trace in faulte XML-RPC responses ...
Is this a bug, yes or no? Strictly speaking, it is not a bug (because no one promisses this feature).
However, I started to work with XML-RPC recently and got annoyed by the difficulty to analyse problems. I patched "ZPublisher.xmlrpc" to send tracebacks with the response. Patch attached. Dieter --- xmlrpc.py~ Wed Jan 9 18:51:57 2002 +++ xmlrpc.py Fri Aug 30 16:51:10 2002 @@ -122,15 +122,29 @@ # Create an appropriate Fault object. Unfortunately, we throw away # most of the debugging information. More useful error reporting is # left as an exercise for the reader. + + # DM + # we include now a compact traceback, if possible + def _compactTb(tb): + '''return a compact traceback (or '').''' + if tb is None: return '' + info= [] + while tb: + f= tb.tb_frame.f_code + info.append((f.co_filename,f.co_name,str(tb.tb_lineno))) + tb= tb.tb_next + return '|'.join(map(':'.join,info)) + tb= tb and _compactTb(tb) or '' + Fault=xmlrpclib.Fault f=None try: if isinstance(v, Fault): f=v elif isinstance(v, Exception): - f=Fault(-1, "Unexpected Zope exception: " + str(v)) + f=Fault(-1, "Unexpected Zope exception: %s: %s [%s]" % (str(t), str(v),tb)) else: - f=Fault(-2, "Unexpected Zope error value: " + str(v)) + f=Fault(-2, "Unexpected Zope error value: %s: %s [%s]" % (str(t),str(v),tb)) except: f=Fault(-3, "Unknown Zope fault type")
participants (3)
-
Charlie Reiman -
Dieter Maurer -
Jay, Dylan