Service = build('drive', 'v3', credentials=creds, cache_discovery=False)įolderid, folderpath = folders_todownload.pop() I use API service with my Gmail account, register my Desktop App with Oauth2 credentials, just same as the code shown in quickstart:, and the share url I test is here: def download_folder(folders_todownload): I tested my script with some other shared folders and didnot encounter the problem. I also use the "Try it" API toolkit from the urls above, and get same result. I have no idea what cause the problem, I have read and, try to change arguments of files().list() and files().get(), with no luck. The most confusing is that, after open the failed folders or preview the failed files in browser, the problems will be solved. With my python script developed using Google drive API, I can list some subfolders and download some files, but failed to list other subfolders (got ) or download other files (404 error), while everyone have read access to all subfolders and files. In share with me, I have a folder shared from someone, and the privilege shows everyone have read access.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |