We are using GAE python standard environment (Python 2.7) and suddenly our
app started experiencing issues when serializing a datastore enum property.
Our code has been deployed and working for over 6 months and today it is
failing. For example:
class SomeType(messages.Enum):
FIRST_TYPE = 1
SECOND_TYPE = 2
THIRD_TYPE = 3
class SomeEntity(polymodel.PolyModel):
# Other fields not shown
something = msgprop.EnumProperty(SomeType, repeated=true)
def get_msg_data(self):
msg_data = {
'something': json.dumps(self.something)
}
return msg_data
The call to json.dumps above started failing in our instance today with an
error like this:
TypeError: SomeType(FIRST_TYPE, 1) is not JSON serializable
Is anyone else seeing this? Note that using the same enum type within a
message where we are not calling json.dumps directly works fine.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/07b1be86-920a-4ff5-8a78-2a4a840273efn%40googlegroups.com.