Hi,
I've been pickling some data to store in a datastore blob, and recently I
tried to download and unpickle the data on my local machine. I got errors
whenever I tried to do this because it seems like production uses a
different version of ProtocolBuffers than the SDK.
Part of the pickled data contained an appengine Key, which contains a
reference to a google.appengine.datastore.entity_pb.Reference, which is a
subclass of google.net.proto.ProtocolBuffer.ProtocolMessage. On the SDK,
this is old-style python class. But it looks like its a new-style class on
production. (Of course, I can't see the code, but it hasattr '__new__' and
'__class__').
I'm not sure if this is a bug. It seems like you should be able to pickle
app engine classes, and it would be nice if you could read that data in the
SDK.
This is the exception that I get when trying to unpickle in the dev SDK:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 1382, in loads
return Unpickler(file).load()
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 858, in load
dispatch[key](self)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py",
line 1083, in load_newobj
obj = cls.__new__(cls, *args)
AttributeError: class Reference has no attribute '__new__'
--Alex
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.