question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot change the Google drive account after reinitializing dvc

See original GitHub issue

Bug 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:

  1. git init
  2. dvc init
  3. dvc add <files-location/file-name>
  4. dvc remote add -d storage gdrive://<file-id>
  5. 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:

  1. dvc destroy
  2. dvc init
  3. dvc add <files-location/file-name>
  4. dvc remote add -d storage gdrive://<new-file-id-account2>
  5. 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:closed
  • Created 9 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
efiopcommented, Dec 19, 2022

@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.

1reaction
sagar-harrycommented, Dec 15, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Setup a Google Drive DVC Remote
Sign into the Google API Console. Double check you're using the intended Google account (upper-right corner). Select or Create a project for DVC...
Read more >
Fix problems in Drive for desktop - Computer - Google Support
On your computer, open Drive for desktop. · Click Settings Settings and then · Click Settings Settings · Click Disconnect account. · If...
Read more >
Limit Login Help Emails Instagram
Limit Login Help Emails InstagramGoogle ads account suspended email. Based on 3 salaries posted anonymously by No Limit Agency Editor employees in Lowell....
Read more >
8 Google Drive Settings and Preferences You Should Change ...
If you have multiple email addresses connected to your Google account, you might find yourself constantly switching between them in order to access...
Read more >
Copying Your Google Drive - Smith College
TRANSFERRING AND EXPORTING YOUR GMAIL, DRIVE FILES, AND OTHER GOOGLE DATA · Processing Time: If you have a large amount of data, the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found