What could cause xmlrpclib.ResponseError: ResponseError() ?
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-05-14T20:31:37Z
Indexed on
2010/05/14
20:34 UTC
Read the original article
Hit count: 267
Hi,
I am experimenting with XML-RPC.
I have the following server script (python):
from SimpleXMLRPCServer import SimpleXMLRPCServer
server = SimpleXMLRPCServer(('localhost', 9000))
def return_input(someinput):
return someinput
server.register_function(return_input)
try:
print 'ctrl-c to stop server'
server.serve_forever()
except KeyboardInterrupt:
print 'stopping'
and the following client script:
import xmlrpclib
server = xmlrpclib.ServerProxy('http://www.example.com/pathto/xmlrpcTester2.py')
print server.return_input('some input')
I have tested this locally and it works fine. All it does it spit out the input fron the client script, which is right.
However, when I try to do it on a remote server I get the following error:
Traceback (most recent call last):
File "client.py", line 4, in <module>
print server.return_input('some input')
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1253, in request
return self._parse_response(h.getfile(), sock)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
return u.close()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 836, in close
raise ResponseError()
xmlrpclib.ResponseError: ResponseError()
Any ideas what could cause this?
Thanks in advance for your help.
© Stack Overflow or respective owner