I have been working with Appengine for 3 months and this is my first post,
but I have read with interest correspondence in this group. Thanks for all
the valuable information.

 

My original problem was simple, or so I thought. I wanted to increment a
value and return it to the datastore. However, the value I do increment does
not return to the datastore incremented. The code below is my attempt to
find the problem, which I do but cannot explain or resolve.

 

I iterate over a "list". In a selected entity I attempt to increment the
"entrycount". I log the before and after incremented value. Works as
expected. However, when I am done with the first interation, I iterate over
the "list" again to review the "entrycount". As you can see by the log
below, the count on Alex has retuned to zero. How is this possible? What am
I missing?

   

        for lst in list:

          if self.request.get(lst.title):

            logging.error('Title: '+lst.title+str(lst.entrycount))

            contacts.groups.append(lst.title) 

            lst.entrycount = lst.entrycount+1

            logging.error('Title: '+lst.title+str(lst.entrycount))

 

          else:

            logging.error('Owner: '+'No title read'+str(lst.entrycount))

 

        for lst in list:

          logging.error('Title: '+lst.title+str(lst.entrycount))

 

        db.put(list) 

        contacts.put()

        util.flushContacts()

        return True

 

The ERROR prefix is meaningless. That is just my log output.

TTP/1.1" 200 -

DEBUG    2009-01-26 00:14:21,203 util.py] getFeedList from cache.

ERROR    2009-01-26 00:14:24,217 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:24,233 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:24,250 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:24,250 ulist.py] Title: alex0

ERROR    2009-01-26 00:14:24,265 ulist.py] Title: alex1

ERROR    2009-01-26 00:14:24,280 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:24,296 ulist.py] Owner: No title read3

ERROR    2009-01-26 00:14:24,296 ulist.py] Owner: No title read4

ERROR    2009-01-26 00:14:24,312 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:24,328 ulist.py] Owner: No title read0

ERROR    2009-01-26 00:14:25,030 ulist.py] Title: asdfsa#0

ERROR    2009-01-26 00:14:25,046 ulist.py] Title: steveb0

ERROR    2009-01-26 00:14:25,062 ulist.py] Title: lindab0

ERROR    2009-01-26 00:14:25,062 ulist.py] Title: alex0

ERROR    2009-01-26 00:14:25,078 ulist.py] Title: good0

ERROR    2009-01-26 00:14:25,092 ulist.py] Title: test13

ERROR    2009-01-26 00:14:25,108 ulist.py] Title: test24

ERROR    2009-01-26 00:14:25,108 ulist.py] Title: onemore0

ERROR    2009-01-26 00:14:25,125 ulist.py] Title: second0


--~--~---------~--~----~------------~-------~--~----~
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 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to