Hi,
I've run into a problem where the SDK reports a BadValueError on a /
read/ operation - but not the corresponding write.
My model looks like:
class PingSummary(db.Model):
dest = db.StringProperty(required = True)
successpings = db.StringListProperty()
failurepings = db.StringListProperty()
timestart = db.IntegerProperty(required = True)
order = db.IntegerProperty(required = True)
subsumed = db.BooleanProperty(default = False)
included = db.StringListProperty()
and I uploaded my (very incomplete) code to
http://fushizen.net/~bd/sinemon.tbz2
The following set of requests will trigger the error:
curl -v '
http://localhost:8080/ping?
pingtime=0&monitorhost=test&dest=sine&success=1'
curl -v '
http://localhost:8080/summarize'
As you can see, it dies on a query:
Traceback (most recent call last):
File "/home/bd/opt/google_appengine/google/appengine/ext/webapp/
__init__.py", line 499, in __call__
handler.get(*groups)
File "/home/bd/opt/google_appengine/sinemon/main.py", line 34, in
get
models.updatesummaries()
File "/home/bd/opt/google_appengine/sinemon/sinemon/models.py", line
101, in updatesummaries
updateorder(order)
File "/home/bd/opt/google_appengine/sinemon/sinemon/models.py", line
90, in updateorder
for item in PingSummary.all().filter('order = ',
order).filter('subsumed =', False):
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 1379, in next
return self.__model_class.from_entity(self.__iterator.next())
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 927, in from_entity
instance = cls(None, **entity_values)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 555, in __init__
prop.__set__(self, value)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 372, in __set__
value = self.validate(value)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 2117, in validate
(
self.name, self.item_type.__name__))
BadValueError: Items in the included list must all be basestring
instances
At this point, requests to the (debug dump) root will also return an
error:
Traceback (most recent call last):
File "/home/bd/opt/google_appengine/google/appengine/ext/webapp/
__init__.py", line 499, in __call__
handler.get(*groups)
File "/home/bd/opt/google_appengine/sinemon/main.py", line 19, in
get
for m in models.PingSummary.all():
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 1379, in next
return self.__model_class.from_entity(self.__iterator.next())
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 927, in from_entity
instance = cls(None, **entity_values)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 555, in __init__
prop.__set__(self, value)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 372, in __set__
value = self.validate(value)
File "/home/bd/opt/google_appengine/google/appengine/ext/db/
__init__.py", line 2117, in validate
(
self.name, self.item_type.__name__))
BadValueError: Items in the included list must all be basestring
instances
Is this a bug in the SDK, and/or am I doing something wrong?
Thanks,
Bryan Donlan