Open rehema-HM opened 5 years ago
This is an old issue but I encountered this problem (for the same script as well). I resolved it fairly easily.
You are likely encountering this issue if you are looking at the file ID in the browser bar. This is for the folder no the .zip file. To find the file ID for the .zip file, right click on the .zip, click "get shareable link", in the link will be the file ID.
I want to download a zip file and extract it but am getting errors here is mmy code `%cd ~/Mask_RCNN
fileId = '1EKGmB8iV1mN6Itxrc6PD2Cw2k01r6A7h'
import os from zipfile import ZipFile from shutil import copy from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive from google.colab import auth from oauth2client.client import GoogleCredentials
os.makedirs('dataset') os.chdir('dataset')
auth.authenticate_user() gauth = GoogleAuth() gauth.credentials = GoogleCredentials.get_application_default() drive = GoogleDrive(gauth)
fileName = fileId + '.zip' downloaded = drive.CreateFile({'id': fileId}) downloaded.GetContentFile(fileName) ds = ZipFile(fileName) ds.extractall() os.remove(fileName) print('Extracted zip file ' + fileName)`
This is the error`/root/Mask_RCNN
FileNotDownloadableError Traceback (most recent call last)