[ZCM] [ZC] 550/ 1 Request "XMLRPC returns no stack trace"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Thu, 29 Aug 2002 20:34:27 -0400


Issue #550 Update (Request) "XMLRPC returns no stack trace"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/550

==============================================================
= Request - Entry #1 by djay on Aug 29, 2002 8:34 pm

If I call a zope object using a XMLRPC client, and it raises an exception, I get the name and value of the exception but no stack trace, even when Zope is running in debug mode.

An example of what is returned is below

>>> s = xmlrpclib.Server("http://localhost:8080/temp_folder")
>>> print s.dud()
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "D:\Python22\lib\xmlrpclib.py", line 820, in __call__
    return self.__send(self.__name, args)
  File "D:\Python22\lib\xmlrpclib.py", line 974, in __request
    verbose=self.__verbose
  File "D:\Python22\lib\xmlrpclib.py", line 852, in request
    return self.parse_response(h.getfile())
  File "D:\Python22\lib\xmlrpclib.py", line 895, in parse_response
    return u.close()
  File "D:\Python22\lib\xmlrpclib.py", line 570, in close
    raise apply(Fault, (), self._stack[0])
Fault: <Fault -2: 'Unexpected Zope error value: <html><head><title>Temporary Folder</title></head><body bgcolor="#FFFFFF">\n\n\n<table border="0" width="100%">\n<tr valign="TOP">\n\n<td width="10%" align="center">\n<img src="http://localhost:8080/p_/ZButton" alt="Zope">\n</td>\n\n<td width="90%">\n  <h2>Zope Error</h2>\n  <p>Zope has encountered an error while publishing this resource.</p>\n  \n  <p>\n  <strong>Error Type: I have issues</strong><br>\n  <strong>Error Value: None</strong><br> \n  </p>\n \n  <hr noshade>\n \n  <p>Troubleshooting Suggestions</p>\n\n  <ul>\n    <li>The URL may be incorrect.</li>\n  <li>The parameters passed to this resource may be incorrect.</li>\n  <li>A resource that this resource relies on may be encountering an error.</li>\n  </ul>\n\n  <p>For more detailed information about the error, please\n  refer to the HTML source for this page.\n  </p>\n\n  <p>If the error persists please contact the site maintainer.\n  Thank you for your patience.\n  </p>\n</td></tr>\n</table>\n\n\n<p><a href="http://www.zope.org/Credits" target="_top"><img src="http://localhost:8080/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope" /></a></p></body></html>\n'>
>>>

I'd say the problem lies in ZPublisher\xmlrpc.py. This should really check if Zope is in debug more and return the stack trace.
==============================================================