Skip to content

Error 400 : "Corpus and corpora are mutually exclusive options." #4

@Datavoore

Description

@Datavoore

Hello,

I'm trying to the list of the files/folders of a team shared drive. I have seen posts where people do this with the following lines of code :

file_list = drive.ListFile({ 'q': "'<drive_id>' in parents and trashed=false",
'corpora': "teamDrive",
'teamDriveId': "<drive_id>",
'includeTeamDriveItems': "true",
'supportsTeamDrives': "true"
}).GetList()

However when I try to use this code, I get a 400 error with the following message :

HttpError 400 when requesting https://www.googleapis.com/drive/v2/files?q=%<drive_id>%27+in+parents+and+trashed%3Dfalse&corpora=teamDrive&teamDriveId=<drive_id>&includeTeamDriveItems=true&supportsTeamDrives=true&maxResults=1000&corpus=DEFAULT&alt=json returned "Corpus and corpora are mutually exclusive options."

I tried passing the corpus : "None" or None in the param dictionnary but it is always coming back in the request url. Is it due to a change of behavior from the part of google or can it be solved by using the library ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions