[ZCM] [ZC] 621/ 1 Request "External methods require save before they can be called with xml-rpc"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Tue, 15 Oct 2002 15:20:40 -0400


Issue #621 Update (Request) "External methods require save before they can be called with xml-rpc"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/621

==============================================================
= Request - Entry #1 by Anonymous User on Oct 15, 2002 3:20 pm

I am trying to call an external method via xml-rpc. After restarting the zope service, the following error occurs:

>>> srv.hello('Mark')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "xmlrpclib.py", line 547, in __call__
    return self.__send(self.__name, args)
  File "xmlrpclib.py", line 630, in __request
    request
  File "/home/mrroach/xmlrpcbasicauth.py", line 44, in request
    return self.parse_response(h.getfile()) 
  File "xmlrpclib.py", line 601, in parse_response
    return u.close()
  File "xmlrpclib.py", line 371, in close
    raise apply(Fault, (), self._stack[0])
xmlrpclib.Fault: <Fault -2: 'Unexpected Zope error value: <html><head><title>Zope</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://uhgcitrix05: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: TypeError</strong><br>\n  <strong>Error Value: too many arguments</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://uhgcitrix05:8080/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope" /></a></p></body></html>\n'>

If I open ZMI and do a "Save Changes" (no changes have actually occurred) then the call works fine:

>>> srv.hello('Mark')
'Hello Mark'

This is using the simplest possible test case with a parameter. 

def hello(myvar):
    return "Hello %s" % myvar
==============================================================