Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python google应用程序引擎搜索api引发错误:TypeError:强制使用Unicode:需要字符串或缓冲区,找到查询_Python_Google App Engine - Fatal编程技术网

Python google应用程序引擎搜索api引发错误:TypeError:强制使用Unicode:需要字符串或缓冲区,找到查询

Python google应用程序引擎搜索api引发错误:TypeError:强制使用Unicode:需要字符串或缓冲区,找到查询,python,google-app-engine,Python,Google App Engine,我正在使用谷歌应用程序引擎搜索API和做一个简单的搜索像 options = search.QueryOptions( limit=200, cursor=cursor, returned_fields=['my_id', 'file_key'] ) query = search.Query(query_string="new OR old", options=option

我正在使用谷歌应用程序引擎搜索API和做一个简单的搜索像

options = search.QueryOptions(
                limit=200,
                cursor=cursor,
                returned_fields=['my_id', 'file_key']
            )


query = search.Query(query_string="new OR old", options=options)
但我得到了这个错误: TypeError:强制使用Unicode:需要字符串或缓冲区,找到查询


如果我从查询字符串或返回的字段选项中删除或条件,则错误将被删除。

您应该包括堆栈跟踪。您能否确切地告诉我们什么查询字符串有效。查询字符串=新,查询字符串=旧有效