XML-RPC and Pickle.....
Edward Muller
edwardam at home.com
Sat Oct 30 23:20:08 EDT 1999
I am trying to unpickle and object on another machine after bieng sent
via xml-rpc.....and I get the following error:
xmlrpclib.Fault: <Fault 1: 'exceptions.SystemError:Failed to import
class foo from module __main__'>
it happens on the loads call....Here is basically what I do on the
client...
class someObject:
def __init__(self):
self.x = 1
self.y = 2
def dosomething(self):
print self.x
print self.y
MyServer = OPEN_XML_RPC_CONNECTION
buf = pickle.dumps(someObject)
MyServer.sendPickle(buf)
On the server I do this....
def sendPickle(buf):
myobj = pickle.loads(buf)
and that is where it fails with the above error....
If you have any idea please drop me an email...I can send the actual
test server/client to you as well..
More information about the Python-list
mailing list