question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to Access Jupyter Server

See original GitHub issue

There are some widgets that require Jupyter Server Extensions. The client then needs to know the base URL where the Jupyter server can be found so that it can reach any assets which may have been added to the server via an extension. In normal notebooks, the base URL of the server can be discovered in a couple different ways which are described by the following function:

const jupyterServerBaseUrl = (() => {
  const jupyterConfig = document.getElementById("jupyter-config-data");
  if (jupyterConfig) {
    return JSON.parse(jupyterConfig.text)["baseUrl"];
  }
  return document.getElementsByTagName("body")[0].getAttribute("data-base-url");
})();

Is there a similar way to discover the Jupyter server’s base URL in VSCode?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rmorsheacommented, Feb 3, 2022

I managed to get things working. The way I’m doing it feels quite hacky, but it does the trick. Basically I use notebook.notebookapp.list_running_server to see if there are any running notebook servers. If there are, I ping the route where I expect my resources to be. If the ping fails, then I know I need to stand up my own static file server and use that instead.

1reaction
rmorsheacommented, Feb 1, 2022

I’m sorry, but right now there isn’t one.

Are there any plans to implement this?

Is this for an organization setup or class room or the like?

This is for an organization setup. I’m a software developer working at AWS CQC to support a team of researchers. We don’t have an internal JupyterHub yet so researchers would need to repeatedly and manually stand up a local Jupyter Server to use the widget in question.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running a notebook server
Running a notebook server ... The Jupyter notebook web application is based on a server-client structure. The notebook server uses a...
Read more >
How to Install, Run, and Connect to Jupyter Notebook on a ...
SSH tunneling enables you to securely connect to remote server ports, which you can then access using a local web browser.
Read more >
Running Jupyter Notebook on an EC2 Server - The Data School
Setting the source to anywhere will allow you to access your Jupyter Notebook from any IP address. You can limit access by entering...
Read more >
How to Connect to JupyterLab Remotely | by Luke Gloege, Ph.D.
Connecting and running Jupyterlab from a laptop is straightforward. You simply type jupyter lab into your terminal and Jupyterlab will open in ...
Read more >
Why I can't access remote Jupyter Notebook server?
When I want to access Jupyter remotely in the same local area network, say open http://192.168.1.111:8045/ , I can't open a Jupyter page...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found