views:

28

answers:

1

Hi,

I am running AppEngine locally.I use some filters on the following attribute of my object :

class Blah(db.Model):
    access_code = db.StringProperty()

Then I run my filter in the view:

cac = Blah.all().filter(
    'access_code =', 'value_to_find').fetch(1)

When doing so, I get the following error : BadValueError: Filtering on Text properties is not supported.

Even tho it's a StringProperty. This never happened before and a few researches on Google didn't help at all. Is anyone having the same issue ?

Best, Martin

+1  A: 

Was the access_code field ever a TextProperty at some point in your application's life? Even if you changed you model definition, any entities that were added to the datastore while it was a Text will remain a Text. You can use the Admin console's data store viewer to look up the specific entity that is causing this problem to make sure that it's access_code field is definitely a StringProperty and not a TextProperty.

Adam Crossland
No all of them are StringProperty. I've just deleted all of them and rebatched the whole import .. still have the same error.
Martin
That was what occurred to me first, too, but that won't cause this error - it'd just lead to missing entries in the result set.
Nick Johnson