Closed andreasKroepelin closed 3 years ago
Hm, I understand and think that this is a valid use case. For the next version (1.0) I will add a way to pass an Options struct to the deserializing methods, and such a mode could be added there.
To find out more about the global, call python -m pickletools <your file>
which disassembles all the pickle opcodes. Globals are marked with GLOBAL or STACK_GLOBAL, the name of the global should be either directly there or pushed on the stack before it.
BTW, what data type are you deserializing into? serde_pickle::Value
?
That's great to hear, looking forward to that development!
Thanks for pointing out pickletools
, I'll give that a try.
And yes, I deserialize into serde_pickle::Value
.
Ok, the option is now implemented; if you are still interested it would be nice if you could test out master before I release 1.0.
Very cool, thanks! Unfortunately, I'm not working on that project anymore and currently don't have time to test it out. I might do so at some time, though!
I experience the following situation: In python, there is some object
foo
which I serialize using pickle and try to deserialize in Rust using serde-pickle, where it fails with anUnresolvedGlobal
error. However, serializing and deserializingfoo.x
actually works and I'm in fact only interested infoo.x
.So my question is: Is there a way to just skip whatever is unresolvable and return everything that could be resolved?
Unfortunately, I could not find out what actually causes the problem with
foo
, yet.