8000 A handful of `google.colab` libraries (e.g. `userdate.get`) are unsupported (for now!) · Issue #215 · googlecolab/colab-vscode · GitHub
[go: up one dir, main page]

Skip to content

A handful of google.colab libraries (e.g. userdate.get) are unsupported (for now!) #215

Open

Description

@kingychiu

Description

I am trying to get data loaded. I am thinking either of mounting a Google Drive or logging in to Kaggle to download data.

But both methods dont work:
For accessing colab secret:

---------------------------------------------------------------------------
TimeoutException                          Traceback (most recent call last)
/tmp/ipython-input-4180325844.py in <cell line: 0>()
      1 from google.colab import userdata
      2 
----> 3 kaggle_username = userdata.get("KAGGLE_USERNAME")
      4 kaggle_key = userdata.get("KAGGLE_KEY")

/usr/local/lib/python3.12/dist-packages/google/colab/userdata.py in get(key)
     64     )
     65   if not resp:
---> 66     raise TimeoutException(key)
     67   if not resp.get('exists', False):
     68     raise SecretNotFoundError(key)

TimeoutException: Requesting secret KAGGLE_USERNAME timed out. Secrets can only be fetched when running from the Colab UI.

Mounting Google Drive takes forever.

Environment

  • VS Code version:

Version: 1.105.1
Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084
Date: 2025-10-14T22:33:36.618Z (1 mo ago)
Electron: 37.6.0
ElectronBuildId: 12502201
Chromium: 138.0.7204.251
Node.js: 22.19.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 25.0.0

  • Colab extension version: 0.1.0
  • Jupyter extension version: 2025.9.1
  • OS (Linux | Mac | Windows): Mac

Repro Steps

Colab Secrets:

from google.colab import userdata

kaggle_username = userdata.get("KAGGLE_USERNAME")
kaggle_key = userdata.get("KAGGLE_KEY")

Mounting Drive:

from google.colab import drive
drive.mount("/content/drive/")

Expected Behaviour

Should be able get the secrets or mounting drive.

Actual Behaviour

Not working.

Activity

  1. kevineger commented on Nov 14, 2025

    @kevineger
    Member

    Thanks for the report @kingychiu! 👍

    Unfortunately our initial release for the extension doesn't support these google.colab libraries which have hard dependencies on the Colab web frontend.

    We've documented these limitations and proposed workarounds in the Wiki here.

    Given that you're the first to file an issue on either of these, I'll leave this one open as the canonical one so we can have folks +1 and hopefully in the near future report back when there's a better fix/support. Thanks for your patience 🙂 !

  2. changed the title [-]Cannot Load Colab Secrets and Mount to Google Drive[/-] [+]A handful of `google.colab` libraries (e.g. `drive.mount` and `userdate.get`) are unsupported (for now!)[/+] on Nov 14, 2025
  3. EvanWiederspan commented on Nov 14, 2025

    @EvanWiederspan
    Contributor

    I just updated the wiki with a better workaround for userdata.get than what we had originally: https://github.com/googlecolab/colab-vscode/wiki/Known-Issues-and-Workarounds#userdataget

    Note that it still requires copying the value from the Colab UI for the time being

  4. adamhadani commented on Dec 9, 2025

    @adamhadani

    +1 for being able to use from google.colab import userdata; userdata.get(MY_SECRET_TOKEN)

  5. changed the title [-]A handful of `google.colab` libraries (e.g. `drive.mount` and `userdate.get`) are unsupported (for now!)[/-] [+]A handful of `google.colab` libraries (e.g. `userdate.get`) are unsupported (for now!)[/+] on Feb 11, 2026
  6. jhaisley commented on Mar 10, 2026

    @jhaisley

    Is userdata.get deprecated? I notice that there doesn't seem to be related progress here, and it's also not supported on Colab Enterprise.

  7. nickserv commented on Mar 16, 2026

    @nickserv

    It seems more likely that they intend to continue supporting it, but for technical reasons it's currently unsupported in Colab Enterprise and this extension.

  8. peterphung2043 commented on Oct 7, 2026

    @peterphung2043

    +1 to see to see this functionality be implemented. As of writing I cannot use this extension for my workflows until this is addressed :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0