Saving a Float or GeoPt in Google App Engine? You need this patch.
This one had me scratching my head and wondering what I'd managed to corrupt in my setup today:
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) 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.