Python 使用API调整从Google Drive检索的图像的大小
我正在使用以下Python代码从Google Drive获取文件:Python 使用API调整从Google Drive检索的图像的大小,python,google-app-engine,google-drive-api,Python,Google App Engine,Google Drive Api,我正在使用以下Python代码从Google Drive获取文件: theGoogleDriveFile = service.files().get(fileId=<googleDriveFileId>).execute() 但我得到了以下错误: raise NotImageError() NotImageError 这项工作: theGoogleDriveFile = service.files().get(fileId=<googleDriveFileId>).e
theGoogleDriveFile = service.files().get(fileId=<googleDriveFileId>).execute()
但我得到了以下错误:
raise NotImageError()
NotImageError
这项工作:
theGoogleDriveFile = service.files().get(fileId=<googleDriveFileId>).execute()
result = urlfetch.fetch(theGoogleDriveFile['webContentLink'])
resizedImage = images.resize(result.content, 32, 32)
googledrivefile=service.files().get(fileId=).execute()
result=urlfetch.fetch(GoogleDriveFile['webContentLink'])
resizedImage=images.resize(result.content,32,32)
theGoogleDriveFile = service.files().get(fileId=<googleDriveFileId>).execute()
result = urlfetch.fetch(theGoogleDriveFile['webContentLink'])
resizedImage = images.resize(result.content, 32, 32)