How to connect to Google Drive through Google Colab


I want to connect to my Google Drive through Google Colab.

I used Streamlit file_uploader. The file I selected is in my Google Drive account. I want to access this file using pydrive. When I try to execute the code below it throws an exception


Here is the exception.

EOFError: EOF when reading a line


File "/usr/local/lib/python3.6/dist-packages/streamlit/", line 324, in _run_script
    exec(code, module.__dict__)File "/content/", line 20, in <module>
    auth.authenticate_user()File "/usr/local/lib/python3.6/dist-packages/google/colab/", line 151, in authenticate_user
    _gcloud_login()File "/usr/local/lib/python3.6/dist-packages/google/colab/", line 95, in _gcloud_login
    code = get_code(prompt + ' ')

Thank you for any feedback.