[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
On May 6, 7:35 pm, DarkCoiote wrote: > Alternativaly can I just clear the cache? yup, that will work too, but we have the fix out, so you shouldn't need to do either that or the workaround. thanks again for the report. please post back and let us know if you see this again! > > Thanks for the support! > > On May 6, 10:48 pm, ryan wrote: > > > sorry for the trouble, all, this is our fault. we're canarying the > > upcoming 1.2.2 release, and it looks like entities that were memcached > > from 1.2.1 aren't compatible with 1.2.2. we're investigating and > > working on a fix right now. > > > as a short term workaround, try adding this line after you pull an > > entity e (an instance of a Model or Expando subclass) out of memcache: > > > e._entity = None > > > that will force it to rebuild its inner datastore.Entity instance, > > which might prevent the error. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
Alternativaly can I just clear the cache? Thanks for the support! On May 6, 10:48 pm, ryan wrote: > sorry for the trouble, all, this is our fault. we're canarying the > upcoming 1.2.2 release, and it looks like entities that were memcached > from 1.2.1 aren't compatible with 1.2.2. we're investigating and > working on a fix right now. > > as a short term workaround, try adding this line after you pull an > entity e (an instance of a Model or Expando subclass) out of memcache: > > e._entity = None > > that will force it to rebuild its inner datastore.Entity instance, > which might prevent the error. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
sorry for the trouble, all, this is our fault. we're canarying the upcoming 1.2.2 release, and it looks like entities that were memcached from 1.2.1 aren't compatible with 1.2.2. we're investigating and working on a fix right now. as a short term workaround, try adding this line after you pull an entity e (an instance of a Model or Expando subclass) out of memcache: e._entity = None that will force it to rebuild its inner datastore.Entity instance, which might prevent the error. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
The situation is still critical. /shoot 604 70% /getfleet 18 2% There was a small window of time that the error seemed to be gone. The actual time is indicated at my previous posts, when I said it was working a few minutes after posting the error returned... and is still here. Any tips? what can I do? (besides putting a msg to the users saying: "The servers are facing technical problems, please try again later" On May 6, 3:17 pm, DarkCoiote wrote: > My app is not that popular and my error % are really higher: > /shoot > 203 53% > /getfleet > 11 2% > > And the /shoot url is almost the most used/important. > > app_id=naval-war > > if you need... > > Please, fix it! Thanks alot! > > On May 6, 12:43 pm, Ben Nevile wrote: > > > I am getting the same bug. 950 times, so almost 0% of the 323.35k > > requests for that handler served since midnight. but a bug > > nonetheless. > > > Nothing too complicated is happening. An entity is being loaded into > > memory, through a standard memcache call that falls back to a > > datastore call. The values are being updated, then a put() is > > called. It's on the put() that I'm seeing the error. > > > Here's the trace: > > > Traceback (most recent call last): > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > __init__.py", line 501, in __call__ > > handler.get(*groups) > > File "controllers/rankings.py", line 114, in get > > friend_team.put() > > File "models/team.py", line 31, in put > > db.Model.put(self) > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > __init__.py", line 695, in put > > return datastore.Put(self._entity) > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 155, in Put > > req.entity_list().extend([e._ToPb() for e in entities]) > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 513, in _ToPb > > name in self.__unindexed_properties): > > AttributeError: 'Entity' object has no attribute > > '_Entity__unindexed_properties' > > > Ben > > > On May 6, 5:19 am, DarkCoiote wrote: > > > > Doing some more tests, and now the requests handler that > > > I was testing stopped giving errors... > > > > My best guess is that someone (you?) is fixing the bug. > > > My fears is that the bug is really nasty and difficult to find/ > > > reproduce and mutable. > > > > Anyway, thanks a lot! > > > > On May 6, 9:11 am, DarkCoiote wrote: > > > > > Actually, the problem still exists... it is only occurring in others > > > > requests handlers... > > > > > And the new point of error is also a updating put > > > > > What does this error actually means? > > > > > On May 6, 9:00 am, DarkCoiote wrote: > > > > > > Well, It was working before, and now is working again! > > > > > > Actually, theentityis being updated. But here is the code anyway > > > > > > person = get_person(owner) > > > > > if person is None: > > > > > self.response.out.write(minjson.write(None)) > > > > > return > > > > > > # converting to dict() - to do a > > > > > json.write at the end: is there a json.write to datastore models? > > > > > tmpPerson['id'] = person.id > > > > > > > > > > tmpPerson['shipsLost'] = person.shipsLost > > > > > > # update access and reload > > > > > if owner == viewer: > > > > > person.name = urllib.unquote(self.request.get('name')) > > > > > person.rank = get_rank(person.score, person.rank) > > > > > Crazy math to get some new numbers > > > > > now = datetime.now() + timedelta(hours=-3) > > > > > .. > > > > > reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) > > > > > # 2 per hour > > > > > > person.lastAccess = datetime.now() > > > > > > person.availableShots = person.availableShots + reloadShots > > > > > if person.availableShots > person.maxShots: > > > > > person.availableShots = person.maxShots > > > > > if person.availableShots < 0: > > > > > person.availableShots = 0 > > > > > > person.put() > > > > > > I guess is all simple stuff that should not give any errors (as it > > > > > didn't give before and is not giving now) > > > > > > Thanks a lot for the quick - almost instant - reply > > > > > > On May 6, 7:10 am, "Nick Johnson (Google)" > > > > > wrote: > > > > > > > Hi, > > > > > > > Can you please paste the code showing how you are constructing the > > > > > >entityyou're trying to put? > > > > > > > -Nick Johnson > > > > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote > > > > > > wrote: > > > > > > > > All of sudden I started getting this error for all of the request > > > > > > > to > > > > > > > app. that requires datastore puts. > > > > > > > > Someonehastweaked something. lol > > > > > > > > The full log: > > > > > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
My app is not that popular and my error % are really higher: /shoot 203 53% /getfleet 11 2% And the /shoot url is almost the most used/important. app_id=naval-war if you need... Please, fix it! Thanks alot! On May 6, 12:43 pm, Ben Nevile wrote: > I am getting the same bug. 950 times, so almost 0% of the 323.35k > requests for that handler served since midnight. but a bug > nonetheless. > > Nothing too complicated is happening. An entity is being loaded into > memory, through a standard memcache call that falls back to a > datastore call. The values are being updated, then a put() is > called. It's on the put() that I'm seeing the error. > > Here's the trace: > > Traceback (most recent call last): > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > __init__.py", line 501, in __call__ > handler.get(*groups) > File "controllers/rankings.py", line 114, in get > friend_team.put() > File "models/team.py", line 31, in put > db.Model.put(self) > File "/base/python_lib/versions/1/google/appengine/ext/db/ > __init__.py", line 695, in put > return datastore.Put(self._entity) > File "/base/python_lib/versions/1/google/appengine/api/ > datastore.py", line 155, in Put > req.entity_list().extend([e._ToPb() for e in entities]) > File "/base/python_lib/versions/1/google/appengine/api/ > datastore.py", line 513, in _ToPb > name in self.__unindexed_properties): > AttributeError: 'Entity' object has no attribute > '_Entity__unindexed_properties' > > Ben > > On May 6, 5:19 am, DarkCoiote wrote: > > > Doing some more tests, and now the requests handler that > > I was testing stopped giving errors... > > > My best guess is that someone (you?) is fixing the bug. > > My fears is that the bug is really nasty and difficult to find/ > > reproduce and mutable. > > > Anyway, thanks a lot! > > > On May 6, 9:11 am, DarkCoiote wrote: > > > > Actually, the problem still exists... it is only occurring in others > > > requests handlers... > > > > And the new point of error is also a updating put > > > > What does this error actually means? > > > > On May 6, 9:00 am, DarkCoiote wrote: > > > > > Well, It was working before, and now is working again! > > > > > Actually, theentityis being updated. But here is the code anyway > > > > > person = get_person(owner) > > > > if person is None: > > > > self.response.out.write(minjson.write(None)) > > > > return > > > > > # converting to dict() - to do a > > > > json.write at the end: is there a json.write to datastore models? > > > > tmpPerson['id'] = person.id > > > > > > > > tmpPerson['shipsLost'] = person.shipsLost > > > > > # update access and reload > > > > if owner == viewer: > > > > person.name = urllib.unquote(self.request.get('name')) > > > > person.rank = get_rank(person.score, person.rank) > > > > Crazy math to get some new numbers > > > > now = datetime.now() + timedelta(hours=-3) > > > > .. > > > > reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) > > > > # 2 per hour > > > > > person.lastAccess = datetime.now() > > > > > person.availableShots = person.availableShots + reloadShots > > > > if person.availableShots > person.maxShots: > > > > person.availableShots = person.maxShots > > > > if person.availableShots < 0: > > > > person.availableShots = 0 > > > > > person.put() > > > > > I guess is all simple stuff that should not give any errors (as it > > > > didn't give before and is not giving now) > > > > > Thanks a lot for the quick - almost instant - reply > > > > > On May 6, 7:10 am, "Nick Johnson (Google)" > > > > wrote: > > > > > > Hi, > > > > > > Can you please paste the code showing how you are constructing the > > > > >entityyou're trying to put? > > > > > > -Nick Johnson > > > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote > > > > > wrote: > > > > > > > All of sudden I started getting this error for all of the request to > > > > > > app. that requires datastore puts. > > > > > > > Someonehastweaked something. lol > > > > > > > The full log: > > > > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_properties' > > > > > > Traceback (most recent call last): > > > > > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > > > > > __init__.py", line 501, in __call__ > > > > > > handler.get(*groups) > > > > > > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > > > > > > line 268, in get > > > > > > person.put() > > > > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > > > > __init__.py", line 695, in put > > > > > > return datastore.Put(self._entity) > > > > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > > > > datastore.py", line 155, in Put > > > > > > req.entity_list().extend([e._ToPb() for e in
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
I am getting the same bug. 950 times, so almost 0% of the 323.35k requests for that handler served since midnight. but a bug nonetheless. Nothing too complicated is happening. An entity is being loaded into memory, through a standard memcache call that falls back to a datastore call. The values are being updated, then a put() is called. It's on the put() that I'm seeing the error. Here's the trace: Traceback (most recent call last): File "/base/python_lib/versions/1/google/appengine/ext/webapp/ __init__.py", line 501, in __call__ handler.get(*groups) File "controllers/rankings.py", line 114, in get friend_team.put() File "models/team.py", line 31, in put db.Model.put(self) File "/base/python_lib/versions/1/google/appengine/ext/db/ __init__.py", line 695, in put return datastore.Put(self._entity) File "/base/python_lib/versions/1/google/appengine/api/ datastore.py", line 155, in Put req.entity_list().extend([e._ToPb() for e in entities]) File "/base/python_lib/versions/1/google/appengine/api/ datastore.py", line 513, in _ToPb name in self.__unindexed_properties): AttributeError: 'Entity' object has no attribute '_Entity__unindexed_properties' Ben On May 6, 5:19 am, DarkCoiote wrote: > Doing some more tests, and now the requests handler that > I was testing stopped giving errors... > > My best guess is that someone (you?) is fixing the bug. > My fears is that the bug is really nasty and difficult to find/ > reproduce and mutable. > > Anyway, thanks a lot! > > On May 6, 9:11 am, DarkCoiote wrote: > > > > > Actually, the problem still exists... it is only occurring in others > > requests handlers... > > > And the new point of error is also a updating put > > > What does this error actually means? > > > On May 6, 9:00 am, DarkCoiote wrote: > > > > Well, It was working before, and now is working again! > > > > Actually, theentityis being updated. But here is the code anyway > > > > person = get_person(owner) > > > if person is None: > > > self.response.out.write(minjson.write(None)) > > > return > > > > # converting to dict() - to do a > > > json.write at the end: is there a json.write to datastore models? > > > tmpPerson['id'] = person.id > > > > > > tmpPerson['shipsLost'] = person.shipsLost > > > > # update access and reload > > > if owner == viewer: > > > person.name = urllib.unquote(self.request.get('name')) > > > person.rank = get_rank(person.score, person.rank) > > > Crazy math to get some new numbers > > > now = datetime.now() + timedelta(hours=-3) > > > .. > > > reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) > > > # 2 per hour > > > > person.lastAccess = datetime.now() > > > > person.availableShots = person.availableShots + reloadShots > > > if person.availableShots > person.maxShots: > > > person.availableShots = person.maxShots > > > if person.availableShots < 0: > > > person.availableShots = 0 > > > > person.put() > > > > I guess is all simple stuff that should not give any errors (as it > > > didn't give before and is not giving now) > > > > Thanks a lot for the quick - almost instant - reply > > > > On May 6, 7:10 am, "Nick Johnson (Google)" > > > wrote: > > > > > Hi, > > > > > Can you please paste the code showing how you are constructing the > > > >entityyou're trying to put? > > > > > -Nick Johnson > > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote > > > > wrote: > > > > > > All of sudden I started getting this error for all of the request to > > > > > app. that requires datastore puts. > > > > > > Someonehastweaked something. lol > > > > > > The full log: > > > > > > 'Entity'objecthasnoattribute'_Entity__unindexed_properties' > > > > > Traceback (most recent call last): > > > > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > > > > __init__.py", line 501, in __call__ > > > > > handler.get(*groups) > > > > > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > > > > > line 268, in get > > > > > person.put() > > > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > > > __init__.py", line 695, in put > > > > > return datastore.Put(self._entity) > > > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > > > datastore.py", line 155, in Put > > > > > req.entity_list().extend([e._ToPb() for e in entities]) > > > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > > > datastore.py", line 513, in _ToPb > > > > > name in self.__unindexed_properties): > > > > > AttributeError: 'Entity'objecthasnoattribute > > > > > '_Entity__unindexed_properties' > > > > > > Line of main.py 268: > > > > > person.put() > > > > > > Person model: > > > > > > class Person(db.Model): > > > > > id = db.StringProperty() > > > > > name = db.StringProperty(default="")
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
Doing some more tests, and now the requests handler that I was testing stopped giving errors... My best guess is that someone (you?) is fixing the bug. My fears is that the bug is really nasty and difficult to find/ reproduce and mutable. Anyway, thanks a lot! On May 6, 9:11 am, DarkCoiote wrote: > Actually, the problem still exists... it is only occurring in others > requests handlers... > > And the new point of error is also a updating put > > What does this error actually means? > > On May 6, 9:00 am, DarkCoiote wrote: > > > Well, It was working before, and now is working again! > > > Actually, the entity is being updated. But here is the code anyway > > > person = get_person(owner) > > if person is None: > > self.response.out.write(minjson.write(None)) > > return > > > # converting to dict() - to do a > > json.write at the end: is there a json.write to datastore models? > > tmpPerson['id'] = person.id > > > > tmpPerson['shipsLost'] = person.shipsLost > > > # update access and reload > > if owner == viewer: > > person.name = urllib.unquote(self.request.get('name')) > > person.rank = get_rank(person.score, person.rank) > > Crazy math to get some new numbers > > now = datetime.now() + timedelta(hours=-3) > > .. > > reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) > > # 2 per hour > > > person.lastAccess = datetime.now() > > > person.availableShots = person.availableShots + reloadShots > > if person.availableShots > person.maxShots: > > person.availableShots = person.maxShots > > if person.availableShots < 0: > > person.availableShots = 0 > > > person.put() > > > I guess is all simple stuff that should not give any errors (as it > > didn't give before and is not giving now) > > > Thanks a lot for the quick - almost instant - reply > > > On May 6, 7:10 am, "Nick Johnson (Google)" > > wrote: > > > > Hi, > > > > Can you please paste the code showing how you are constructing the > > > entity you're trying to put? > > > > -Nick Johnson > > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote wrote: > > > > > All of sudden I started getting this error for all of the request to > > > > app. that requires datastore puts. > > > > > Someone has tweaked something. lol > > > > > The full log: > > > > > 'Entity' object has no attribute '_Entity__unindexed_properties' > > > > Traceback (most recent call last): > > > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > > > __init__.py", line 501, in __call__ > > > > handler.get(*groups) > > > > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > > > > line 268, in get > > > > person.put() > > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > > __init__.py", line 695, in put > > > > return datastore.Put(self._entity) > > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > > datastore.py", line 155, in Put > > > > req.entity_list().extend([e._ToPb() for e in entities]) > > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > > datastore.py", line 513, in _ToPb > > > > name in self.__unindexed_properties): > > > > AttributeError: 'Entity' object has no attribute > > > > '_Entity__unindexed_properties' > > > > > Line of main.py 268: > > > > person.put() > > > > > Person model: > > > > > class Person(db.Model): > > > > id = db.StringProperty() > > > > name = db.StringProperty(default="") # for use with global rank > > > > score = db.IntegerProperty(default=0) > > > > rank = db.IntegerProperty(default=0) # military rank - from 0 to 17 > > > > globalRankingPos = db.IntegerProperty(default=0) # global ranking > > > > position > > > > trustness = db.FloatProperty(default=0.0) > > > > fakeness = db.FloatProperty(default=0.0) > > > > currentFleet = db.IntegerProperty(default=0) > > > > availableShots = db.IntegerProperty(default=0) > > > > maxShots = db.IntegerProperty(default=0) > > > > shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list", > > > > default=[0,0,0,0,0]) # list in which position i has the number of i+1 > > > > sized ships > > > > shipsLost = db.ListProperty(int,verbose_name="Lost ships list", > > > > default=[0,0,0,0,0]) > > > > lastAccess = db.DateTimeProperty(auto_now_add=True) > > > > > Any thing I can do? > > > > > Thanks alot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
Actually, the problem still exists... it is only occurring in others requests handlers... And the new point of error is also a updating put What does this error actually means? On May 6, 9:00 am, DarkCoiote wrote: > Well, It was working before, and now is working again! > > Actually, the entity is being updated. But here is the code anyway > > person = get_person(owner) > if person is None: > self.response.out.write(minjson.write(None)) > return > > # converting to dict() - to do a > json.write at the end: is there a json.write to datastore models? > tmpPerson['id'] = person.id > > tmpPerson['shipsLost'] = person.shipsLost > > # update access and reload > if owner == viewer: > person.name = urllib.unquote(self.request.get('name')) > person.rank = get_rank(person.score, person.rank) > Crazy math to get some new numbers > now = datetime.now() + timedelta(hours=-3) > .. > reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) > # 2 per hour > > person.lastAccess = datetime.now() > > person.availableShots = person.availableShots + reloadShots > if person.availableShots > person.maxShots: > person.availableShots = person.maxShots > if person.availableShots < 0: > person.availableShots = 0 > > person.put() > > I guess is all simple stuff that should not give any errors (as it > didn't give before and is not giving now) > > Thanks a lot for the quick - almost instant - reply > > On May 6, 7:10 am, "Nick Johnson (Google)" > wrote: > > > Hi, > > > Can you please paste the code showing how you are constructing the > > entity you're trying to put? > > > -Nick Johnson > > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote wrote: > > > > All of sudden I started getting this error for all of the request to > > > app. that requires datastore puts. > > > > Someone has tweaked something. lol > > > > The full log: > > > > 'Entity' object has no attribute '_Entity__unindexed_properties' > > > Traceback (most recent call last): > > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > > __init__.py", line 501, in __call__ > > > handler.get(*groups) > > > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > > > line 268, in get > > > person.put() > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > __init__.py", line 695, in put > > > return datastore.Put(self._entity) > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > datastore.py", line 155, in Put > > > req.entity_list().extend([e._ToPb() for e in entities]) > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > datastore.py", line 513, in _ToPb > > > name in self.__unindexed_properties): > > > AttributeError: 'Entity' object has no attribute > > > '_Entity__unindexed_properties' > > > > Line of main.py 268: > > > person.put() > > > > Person model: > > > > class Person(db.Model): > > > id = db.StringProperty() > > > name = db.StringProperty(default="") # for use with global rank > > > score = db.IntegerProperty(default=0) > > > rank = db.IntegerProperty(default=0) # military rank - from 0 to 17 > > > globalRankingPos = db.IntegerProperty(default=0) # global ranking > > > position > > > trustness = db.FloatProperty(default=0.0) > > > fakeness = db.FloatProperty(default=0.0) > > > currentFleet = db.IntegerProperty(default=0) > > > availableShots = db.IntegerProperty(default=0) > > > maxShots = db.IntegerProperty(default=0) > > > shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list", > > > default=[0,0,0,0,0]) # list in which position i has the number of i+1 > > > sized ships > > > shipsLost = db.ListProperty(int,verbose_name="Lost ships list", > > > default=[0,0,0,0,0]) > > > lastAccess = db.DateTimeProperty(auto_now_add=True) > > > > Any thing I can do? > > > > Thanks alot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
Well, It was working before, and now is working again! Actually, the entity is being updated. But here is the code anyway person = get_person(owner) if person is None: self.response.out.write(minjson.write(None)) return # converting to dict()- to do a json.write at the end: is there a json.write to datastore models? tmpPerson['id'] = person.id tmpPerson['shipsLost'] = person.shipsLost # update access and reload if owner == viewer: person.name = urllib.unquote(self.request.get('name')) person.rank = get_rank(person.score, person.rank) Crazy math to get some new numbers now = datetime.now() + timedelta(hours=-3) .. reloadShots = 0 + ((now.hour+(24*dayDiff))*2)-(before.hour*2) # 2 per hour person.lastAccess = datetime.now() person.availableShots = person.availableShots + reloadShots if person.availableShots > person.maxShots: person.availableShots = person.maxShots if person.availableShots < 0: person.availableShots = 0 person.put() I guess is all simple stuff that should not give any errors (as it didn't give before and is not giving now) Thanks a lot for the quick - almost instant - reply On May 6, 7:10 am, "Nick Johnson (Google)" wrote: > Hi, > > Can you please paste the code showing how you are constructing the > entity you're trying to put? > > -Nick Johnson > > On Wed, May 6, 2009 at 11:06 AM, DarkCoiote wrote: > > > All of sudden I started getting this error for all of the request to > > app. that requires datastore puts. > > > Someone has tweaked something. lol > > > The full log: > > > 'Entity' object has no attribute '_Entity__unindexed_properties' > > Traceback (most recent call last): > > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > > __init__.py", line 501, in __call__ > > handler.get(*groups) > > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > > line 268, in get > > person.put() > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > __init__.py", line 695, in put > > return datastore.Put(self._entity) > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 155, in Put > > req.entity_list().extend([e._ToPb() for e in entities]) > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 513, in _ToPb > > name in self.__unindexed_properties): > > AttributeError: 'Entity' object has no attribute > > '_Entity__unindexed_properties' > > > Line of main.py 268: > > person.put() > > > Person model: > > > class Person(db.Model): > > id = db.StringProperty() > > name = db.StringProperty(default="") # for use with global rank > > score = db.IntegerProperty(default=0) > > rank = db.IntegerProperty(default=0) # military rank - from 0 to 17 > > globalRankingPos = db.IntegerProperty(default=0) # global ranking > > position > > trustness = db.FloatProperty(default=0.0) > > fakeness = db.FloatProperty(default=0.0) > > currentFleet = db.IntegerProperty(default=0) > > availableShots = db.IntegerProperty(default=0) > > maxShots = db.IntegerProperty(default=0) > > shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list", > > default=[0,0,0,0,0]) # list in which position i has the number of i+1 > > sized ships > > shipsLost = db.ListProperty(int,verbose_name="Lost ships list", > > default=[0,0,0,0,0]) > > lastAccess = db.DateTimeProperty(auto_now_add=True) > > > Any thing I can do? > > > Thanks alot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: 'Entity' object has no attribute '_Entity__unindexed_properties'
Hi, Can you please paste the code showing how you are constructing the entity you're trying to put? -Nick Johnson On Wed, May 6, 2009 at 11:06 AM, DarkCoiote wrote: > > All of sudden I started getting this error for all of the request to > app. that requires datastore puts. > > Someone has tweaked something. lol > > The full log: > > 'Entity' object has no attribute '_Entity__unindexed_properties' > Traceback (most recent call last): > File "/base/python_lib/versions/1/google/appengine/ext/webapp/ > __init__.py", line 501, in __call__ >handler.get(*groups) > File "/base/data/home/apps/naval-war/1.333185504277530133/main.py", > line 268, in get >person.put() > File "/base/python_lib/versions/1/google/appengine/ext/db/ > __init__.py", line 695, in put >return datastore.Put(self._entity) > File "/base/python_lib/versions/1/google/appengine/api/ > datastore.py", line 155, in Put >req.entity_list().extend([e._ToPb() for e in entities]) > File "/base/python_lib/versions/1/google/appengine/api/ > datastore.py", line 513, in _ToPb >name in self.__unindexed_properties): > AttributeError: 'Entity' object has no attribute > '_Entity__unindexed_properties' > > > > Line of main.py 268: > person.put() > > Person model: > > class Person(db.Model): > id = db.StringProperty() > name = db.StringProperty(default="") # for use with global rank > score = db.IntegerProperty(default=0) > rank = db.IntegerProperty(default=0) # military rank - from 0 to 17 > globalRankingPos = db.IntegerProperty(default=0) # global ranking > position > trustness = db.FloatProperty(default=0.0) > fakeness = db.FloatProperty(default=0.0) > currentFleet = db.IntegerProperty(default=0) > availableShots = db.IntegerProperty(default=0) > maxShots = db.IntegerProperty(default=0) > shipsSunk = db.ListProperty(int,verbose_name="Sunken ships list", > default=[0,0,0,0,0]) # list in which position i has the number of i+1 > sized ships > shipsLost = db.ListProperty(int,verbose_name="Lost ships list", > default=[0,0,0,0,0]) > lastAccess = db.DateTimeProperty(auto_now_add=True) > > > Any thing I can do? > > Thanks alot! > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---