Can't get serializers other than serpent to work

Ismail <[email protected]>
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
I am trying to use pickle as a serializer (mostly because I do not want to 
be limited to sending and receiving strings) with Pyro4. 

My setup is as follows:
Server running on Windows 7 64bit, Python 2.7.5 32bit, with Pyro4 4.20
Client and NameServer running on Debian Wheezy 64bit, Python 2.7.3 64bit, 
with Pyro4 4.20

Pickle works well - independently of Pyro4 - between the two machines.

Here's the relevant Server code:
    Pyro4.config.reset()
    Pyro4.config.HOST = host
    Pyro4.config.NS_HOST = ns_host
    Pyro4.config.NS_PORT = ns_port
    Pyro4.config.SERIALIZER = 'pickle'
    daemon = Pyro4.Daemon(host=host, port=port)
    ns = Pyro4.locateNS(host=ns_host, port=ns_port)
    uri = daemon.register(MyObject(''))
    ns.register(objectID, uri)
    daemon.requestLoop()

And the trace of the server not starting:

Traceback (most recent call last):
  File "my_server.py", line 198, in <module>
    main()
  File "my_server.py", line 187, in main
    ns = Pyro4.locateNS(host=ns_host, port=ns_port)
  File "C:\Python27\lib\site-packages\Pyro4\naming.py", line 331, in 
locateNS
    proxy.ping()
  File "C:\Python27\lib\site-packages\Pyro4\core.py", line 161, in __call__
    return self.__send(self.__name, args, kwargs)
  File "C:\Python27\lib\site-packages\Pyro4\core.py", line 310, in 
_pyroInvoke
    data=self._pyroSerializer.deserializeData(data, compressed=flags & 
MessageFa
ctory.FLAGS_COMPRESSED)
  File "C:\Python27\lib\site-packages\Pyro4\util.py", line 149, in 
deserializeDa
ta
    return self.loads(data)
  File "C:\Python27\lib\site-packages\Pyro4\util.py", line 334, in loads
    return pickle.loads(data)
cPickle.UnpicklingError: invalid load key, '#'.



The current set up works when configured to use Serpent, but doesn't work 
with any of the other serializers.

Using Serpent I can get the following result sending a msg string and 
returning it (Note the u' ' format?):

(u"It's somewhat working...", u'Yay.')

I'm out of my depth. Any guidance is appreciated.

Thanks,
Ismail


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.