From 4215f20fe0657067a2848990e63f486dc5738520 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 27 Jan 2024 19:49:15 -0500 Subject: [PATCH] update url to get path from colab. --- pycse/colab.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pycse/colab.py b/pycse/colab.py index 329c583..ab83b9a 100644 --- a/pycse/colab.py +++ b/pycse/colab.py @@ -84,7 +84,9 @@ def current_notebook(): """Return current notebook name and file id. """ ip = gethostbyname(gethostname()) - d = requests.get(f"{ip}:9000/api/sessions").json()[0] + url = f"{ip}:9000/api/sessions" + print(f'Getting data from {url}') + d = requests.get(url).json()[0] fid = d["path"].split("=")[1] fname = d["name"] return fname, fid