Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Datavoore opened this issue Jan 22, 2020 · 4 comments
Closed

Comments

@Datavoore
Copy link

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 ?

@shcheklein
Copy link
Member

hi! @Datavoore . I think it will be fixed by this PR #6 (that is merged already). And we will try to release a new version soon.

@Datavoore
Copy link
Author

Thanks, I will keep you updated as soon as the new version comes out.

@shcheklein
Copy link
Member

@Datavoore I think the new 1.4.2 version is released, could you give it a try, please?

@Datavoore
Copy link
Author

It is working for me ! Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants