Cannot change the Google drive account after reinitializing dvc
See original GitHub issueBug Report
Unable to reauthenticate for different google account.
Description
I have pushed the files using dvc push to my google drive; The followed procedure was:
- git init
- dvc init
- dvc add <files-location/file-name>
- dvc remote add -d storage gdrive://<file-id>
- dvc push
Browser opened up and asked for authentication and I selected the account and authentication was successful and files were pushed to gdrive as expected. But now I wanted to change the google drive account hence I followed the following procedure:
- dvc destroy
- dvc init
- dvc add <files-location/file-name>
- dvc remote add -d storage gdrive://<new-file-id-account2>
- dvc push
The issue is now the program is failing to push the files
Expected
Expecting a re- authentication for new gdrive account But got the following issue:
$ dvc push
ERROR: unexpected error - : <HttpError 404 when requesting https://www.googleapis.com/drive/v2/files/1YvqGNV6FyS-WvqVM017NCim_2MesgxVG?fields=driveId&supportsAllDrives=true&alt=json returned “File not found: 1YvqGNV6FyS-WvqVM017NCim_2MesgxVG”. Details: “[{‘message’: ‘File not found: 1YvqGNV6FyS-WvqVM017NCim_2MesgxVG’, ‘domain’: ‘global’, ‘reason’: ‘notFound’, ‘location’: ‘file’, ‘locationType’: ‘other’}]”>
Environment information
Output of dvc doctor
:
$ dvc doctor
DVC version: 2.38.1 (pip)
Platform: Python 3.10.8 on Windows-10-10.0.19044-SP0
Subprojects:
dvc_data = 0.28.4
dvc_objects = 0.14.0
dvc_render = 0.0.15
dvc_task = 0.1.8
dvclive = 1.2.2
scmrepo = 0.1.4
Supports:
gdrive (pydrive2 = 1.15.0),
http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3)
Cache types: hardlink
Cache directory: NTFS on D:
Caches: local
Remotes: gdrive
Workspace directory: NTFS on D:
Repo: dvc, git
Issue Analytics
- State:
- Created 9 months ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@sagar-harry My guess is maybe you had a wrong url (not gdrive:// one). But that’s why I was asking for
dvc config --list
🙂 Good to hear it works now.Thanks a lot @efiop it worked. Used the below command from the documentation shared.
dvc remote modify --local myremote profile myprofile
My bad I missed that section of documentation, thanks for the support.