I have been using the Exporter but I get KeyError exceptions when my
entities are missing a new optional property.

  def __ExtractProperties(self, entity):
    encoding = []
    for name, fn, default in self.__properties:
      try:
        encoding.append(fn(entity[name]))
      except (AttributeError, KeyError):
        if default is None:
          raise MissingPropertyError(name)
        else:
          encoding.append(default)
    return encoding

I added KeyError to the except clause and now everything is well. It
still respects the fact that if None is specified an error will be
thrown. Otherwise, I'm stuck unable to export my data.

What do you guys think?

-Elias
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to