diff --git a/dvc/remote/gdrive.py b/dvc/remote/gdrive.py index b9788ad02a..9b141402fd 100644 --- a/dvc/remote/gdrive.py +++ b/dvc/remote/gdrive.py @@ -33,12 +33,11 @@ class GDriveMissedCredentialKeyError(DvcException): @decorator def _wrap_pydrive_retriable(call): - from apiclient import errors from pydrive2.files import ApiRequestError try: result = call() - except (ApiRequestError, errors.HttpError) as exception: + except ApiRequestError as exception: retry_codes = ["403", "500", "502", "503", "504"] if any( "HttpError {}".format(code) in str(exception) @@ -210,6 +209,7 @@ def drive(self): GoogleAuth.DEFAULT_SETTINGS["get_refresh_token"] = True GoogleAuth.DEFAULT_SETTINGS["oauth_scope"] = [ "https://www.googleapis.com/auth/drive", + # drive.appdata grants access to appDataFolder GDrive directory "https://www.googleapis.com/auth/drive.appdata", ]