Search code examples
jupytergoogle-colaboratorykaggle

Unable to Generate creds for the Drive FUSE library


I decide to use colab and google-drive-ocamlfuse to link my project to my drive, after reading a blog, the reference is herehttp://medium.com/@burakteke/tutorial-on-using-google-colab-for-kaggle-competition-620393c22821

I have fiexed its first part to install fuse after reading the answer from here Unable to locate package google-drive-ocamlfuse , suddenly stopped working

when I am trying to do the third part:

# Generate creds for the Drive FUSE library.
from oauth2client.client import GoogleCredentials
creds = GoogleCredentials.get_application_default()
import getpass
!google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL
vcode = getpass.getpass()
!echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret}

it just keep running, and I found no anwer from anywhere... please see the pic hereenter image description here


Solution

  • Rather than debugging this third-party wrapper, it's simpler to use the built-in Drive FUSE client:

    from google.colab import drive
    drive.mount('/content/gdrive')
    

    Then, your files will be available, and you can interact with them in the built-in file browser.

    enter image description here