用查询列出文件时出错 [英] Error when listing files with query
问题描述
当我尝试通过列出不同查询标准来检索文件夹时,在Python中,我得到一个错误 HTTP 500内部错误
。
请求文件夹的代码如下:
q = [家长的根目录 ,title ='test',mimeType ='application / vnd.google-apps.folder',trashed = false]
default_folder_list = service.files().list(q ='and' .join(q),fields =items / id)。execute()
父母的标准,它的工作原理。如果我尝试使用 API资源管理器,它也可以很好地工作。
我的应用程序只有 drive.file
权限。
这个错误的起源可能是什么?
这是一个已知问题,使用 drive.file
drive.readonly.metadata
另外用于查询。
编辑:看起来查询也被打破c $ c> drive.appdata 范围。我确信我们正在尽快解决它。
When I try to retrieve a folder by listing with differents query criterias, in Python, I get an error HTTP 500 "Internal error"
.
The code to request the folder is the following:
q = ["'root' in parents", "title='test'", "mimeType='application/vnd.google-apps.folder'", "trashed=false"]
default_folder_list = service.files().list(q=' and '.join(q), fields="items/id").execute()
If I remove the title or the parents criteria, it works. If I try with the API explorer, it also works perfectly.
My app has only the drive.file
permission.
What could be the origin of this error?
It's a known issue with drive.file
scope, use drive.readonly.metadata
additionally for queries.
Edit: It looks like the query is also broken with drive.appdata
scope. I'm making sure that we're fixing it as soon as possible.
这篇关于用查询列出文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!