Re: message used serializer that is not accepted: 4

Richard van Bemmelen <[email protected]> Sat, 1 Feb 2014 17:28:10 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <CAMEWXj0kFG2x-sfy5ACAYKEUPuOpckCeLzc5NvrhscOQX0E58Q@mail.gmail.com>
It looks if its working now...

Apparently the *name server* also needs to know the added protocol, not
only the client and the server??
I had exported the environment variables in another bash shell then were I
started the name server from.

Richard


2014-02-01 Richard van Bemmelen <[email protected]>:

> Now, when I add the line :
>
> Pyro4.config.SERIALIZER = 'pickle'
>
>
> to my client, the client says:
>
> Traceback (most recent call last):
>   File "/Users/richard/Desktop/MyPython/CsClientNS.py", line 62, in
> <module>
>     stat()
>   File "/Users/richard/Desktop/MyPython/CsClientNS.py", line 13, in stat
>     print 'status........',cs.getStatus()
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 160, in __call__
>     return self.__send(self.__name, args, kwargs)
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 286, in _pyroInvoke
>     self.__pyroCreateConnection()
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 346, in __pyroCreateConnection
>     uri=resolve(self._pyroUri)
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/naming.py",
> line 358, in resolve
>     uri=nameserver.lookup(uri.object)
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 160, in __call__
>     return self.__send(self.__name, args, kwargs)
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 318, in _pyroInvoke
>     raise data
> Pyro4.errors.ProtocolError: message used serializer that is not accepted: 4
>
> and the *name server *has the same message:
>
> RMA:~ richard$ python -m Pyro4.naming -n 10.0.1.4
> Broadcast server running on 0.0.0.0:9091
> NS running on 10.0.1.4:9090 (10.0.1.4)
> URI = PYRO:[email protected]:9090
> Exception in thread Pyro-Worker-4546427920 :
> Traceback (most recent call last):
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py",
> line 552, in __bootstrap_inner
>     self.run()
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/tpjobqueue.py",
> line 62, in run
>     self.job()
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/socketserver/threadpoolserver.py",
> line 34, in __call__
>     self.daemon.handleRequest(self.csock)
>   File
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py",
> line 710, in handleRequest
>     raise errors.ProtocolError("message used serializer that is not
> accepted: %d" % msg.serializer_id)
> ProtocolError: message used serializer that is not accepted: 4
>
> BTW, the server has the following line :
>
> Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle')
>
> Richard
>
>
> 2014-02-01 Irmen de Jong <[email protected]>:
>
>> On 1-2-2014 9:35, Richard van Bemmelen wrote:
>>
>> > Hello,
>> >
>> > I would like to use pickle as serializer, because I have to serialize
>> classes.
>> > I've enabled pickle in the client and the server using the suggestions
>> on this forum,
>> > but still get this error message.
>> >
>> > Pyro4.configuration shows:
>> > SERIALIZER = pickle
>> > SERIALIZERS_ACCEPTED = set(['json', 'pickle', 'marshal', 'serpent'])
>> >
>> > What could be wrong here?
>> >
>>
>> You'll need to provide us with more info to be able to answer that
>> question.
>> What is "this error message"? What piece of code causes it? Is it coming
>> from your
>> client code of your server code, or perhaps even from Pyro's name server?
>>
>> Obviously it occurs in a different part of your system than what is using
>> the above
>> settings, because they are fine.
>>
>>
>> Irmen
>>
>>
>>
>> ------------------------------------------------------------------------------
>> WatchGuard Dimension instantly turns raw network data into actionable
>> security intelligence. It gives you real-time visual feedback on key
>> security issues and trends.  Skip the complicated setup - simply import
>> a virtual appliance and go from zero to informed in seconds.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Pyro-core mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/pyro-core
>>
>
>

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk

_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core