Re: Custom Class Serialization with Serpent.
Abhishek Dwaraki <[email protected]> Mon, 16 Dec 2013 10:37:19 -0500
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
Hey Christian,
Thank you for the guidance. In the time that I had since I posted my query, I did exactly what you suggested. I converted it to a string representation and then just to be on the safer side, reconverted the literals to their respective types on the receiving end. I am still getting the unserializable class protocol error.
I will recreate the scenario and send out the error traceback from my console in a bit. Thank you for your guidance.
Regards,
Abhishek.
On Dec 16, 2013, at 10:33 AM, Christian O'Reilly <[email protected]> wrote:
> Hi Abhishek,
>
> My way of dealing with this in the past was to avoid using unsuported types within my classes that need to be serialized. I don't know much about Python's IPv4 class, but I suppose you can probably save a string representation of your IPv4 object in your class needing serializiation, converting this string representation to an IPv4 object manually whenever it is needed.
>
> Of course, it would be much nicer if we could just decorate some of our classe's methods with @sepent_serialize and @serpent_unserialize decorators to implement the serialization for custom classes... but I don't think there is such mechanism implemented (yet) in serpent...
>
> I hope it can help,
>
> Christian
>
>
> 2013/12/15 Abhishek Dwaraki <[email protected]>
> Hey folks,
> I have gone through the Pyro documentation and even the tutorials. I implemented a Pyro example for my work. Unfortunately, I am getting a Protocol Error saying that the class is unsupported.
>
> I did try to convert the received object back to the proper types, but it still throws the error. The only “unsupported” type I have in my object is Python 3.3’s new IPv4 address object (well, the one that the built in module supports).
>
> The serialization is working in Pickle but not with Serpent. Can someone point me in the right direction? Or am I doing something blatantly wrong and not realizing it?
>
> Regards,
> Abhishek.
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> Pyro-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyro-core
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> Pyro-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyro-core
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core