You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A handful of google.colab libraries (e.g. userdate.get) are unsupported (for now!) #215
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.
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.
Reacted by PythicCoder, dzidek, Roger Barnes, Clyde Eugene Makamure, Andrés Salazar, Jerry Yang, cyapur, Yaxin, William Goode, Yatima-Kagurazaka and 29 more
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 🙂 !
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
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
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.
Activity
kevineger commentedon Nov 14, 2025
Thanks for the report @kingychiu! 👍
Unfortunately our initial release for the extension doesn't support these
google.colablibraries 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 🙂 !
[-]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!)[/+]EvanWiederspan commentedon Nov 14, 2025
I just updated the wiki with a better workaround for
userdata.getthan what we had originally: https://github.com/googlecolab/colab-vscode/wiki/Known-Issues-and-Workarounds#userdatagetNote that it still requires copying the value from the Colab UI for the time being
adamhadani commentedon Dec 9, 2025
+1 for being able to use
from google.colab import userdata; userdata.get(MY_SECRET_TOKEN)[-]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!)[/+]jhaisley commentedon Mar 10, 2026
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.
nickserv commentedon Mar 16, 2026
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.
peterphung2043 commentedon Oct 7, 2026
+1 to see to see this functionality be implemented. As of writing I cannot use this extension for my workflows until this is addressed :(