I just uploaded the prototype I've been working on for the last few
weeks and I'm seeing different and unexpected behavior on the server.
The following method is run at the beginning of a transaction to
ensure that the transaction will operate on the most current state of
the entities modified.  All its doing is getting the key for an entity
and then using the key to get the current sate of the entity.  This
has been working fine locally for weeks.

    def __FreshenEntities(self, names, toSetNone):
        for attrName in names:
            attr = getattr(self, attrName)
            if attr is None:
                raise AttributeError(HelperMethods.method_name(self) +
" attribute " + attrName + " not expected")
            key = attr.key()
            if key is None:
                raise
Exception("FGBeingRootInterface.__FreshenEntities " + attrName + " key
is none")
            entity = attr.get(key)
            if entity is None:
                entity = db.get(key)
                if entity is None:
                    entity = db.get(str(key))
                    if entity is None:
                        raise
Exception("FGBeingRootInterface.__FreshenEntities " + attrName + " was
none after being gotten from DS using key " + str(key))
            setattr(self, attrName, entity)
            if getattr(self, attrName) is None:
                raise
Exception("FGBeingRootInterface.__FreshenEntities self." + attrName +
" was none after being set")
            toSetNone.remove(attrName)

After seeing an exception thrown on the server due to an attribute
with a None value I added the two extra attempts to get the entity in
my efforts to determine what is going on, but all three return None
without throwing an exception.

The attributes were gotten the first time just before this method was
called, so I don't understand how their keys can all of the sudden not
be valid nor why get is not throwing some kind of an exception.
Follows is the generated exception test for one occurrence and the key
string looks legitimate:

Exception: FGBeingRootInterface.__FreshenEntities _ranking was none
after being gotten from DS using key
ag53ZWJnYW1lc2J5am9zaHIjCxIMRkcwUmFua0dyb3VwGOoHDAsSCkZHMFJhbmtpbmcYAQw

Anyone encountered anything similar?

Any ideas on how to figure out what is failing?

Thanks,

Josh Heitzman
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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