Saving a Float or GeoPt in Google App Engine? You need this patch.
After you save a float (or, in my case, a GeoPt instance) to the datastore, the next time you start the server (e.g., ./manage.py runserver or dev_appserver.py .), you'll get a traceback that culminates in:
File "/usr/local/google_appengine/google/net/proto/ProtocolBuffer.py", line 455, in getDouble
return struct.unpack("d", a)[0]
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/struct.py", line 87, in unpack
return o.unpack(s)
This ticket, by blfgomes, explains what the problem is and contains a patch that fixes it. In a nutshell, the method struct.unpack expects a string but is getting an array.
The Saving a Float or GeoPt in Google App Engine? You need this patch. article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

Subscribe to my blog





