Skip to content

Commit

Permalink
update url to get path from colab.
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Jan 28, 2024
1 parent 3020081 commit 4215f20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pycse/colab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4215f20

Please sign in to comment.