You should look at the line of code that error is happening on; it's not the lines you post. You're probably doing something like location.place
later on, but location
is a GqlQuery, not the results of the query. You probably want:
location = db.GqlQuery("SELECT * FROM Location WHERE place='Mumbai'").get()
To get the first result, or use fetch
to get a list of results.