This got rid of the errors. Thanks Massimo.
The only thing I added was a try-except block on search() when no people were found. The simpler version of the query also restricted the search somehow (had to search first name and last name with the right capitalization) but I guess that's the trade off. Will look for a way to improve the search with the GAE caveats in mind.