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.

Connecting to remote jupyter server doesnt save the url for current session

See original GitHub issue

This is a corner case, as the jupyter server is executed inside vscode terminal, and thus restarting for the changes to take effect, will nullify the server (as it closes the terminal obviously).

Environment data

  • VS Code version: 1.41.1
  • Extension version (available under the Extensions sidebar): 2020.1.58038
  • OS and version: Ubuntu 18.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.3 Anaconda
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: -
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; ): not set

Expected behaviour

Should accept the remote URL, save it and connect based on it

Actual behaviour

it doesnt save the URL, if you set the url, and Enter, and try to execute a cell, it will try to use the previous URL. if you Ctrl+Shift+P again and try to view the URL you entered, you see there is nothing there except the previous URL. If you restart the vscode, and then try to view the set url, you’ll see what you enetered prior to restarting the vscode. Basically, you can never connect to a remote jupyter, becasue when you enter your url, it doesnt get saved. for it to be saved, you need to restart vscode. and if you do, your session is also need to change if you have started the jupyter server from the terminal inside vscode.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Run vscode
  2. Run the new instance of jupyter notebook from Terminal inside vscode ( this is related to microsoft/vscode-python#9665 )
  3. Ctrl+Shift+P Type jupyter, Select: Python: Specify local or remote Jupyter server for connections Enter URL of jupyter server with token and press Enter,
  4. try to run a cell , it fails.
  5. restart vscode for the settings to be saved
  6. you are back to step 2 , repeat this loop!

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

dont have access to log files, as the system is isolated 

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)

dont have access to log files, as the system is isolated 

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
greazercommented, Jan 23, 2020

We believe this is adequately resolved by the solution to microsoft/vscode-jupyter#1366. Feel l free to reopen if you feel that solution will not suffice.

1reaction
IanMatthewHuffcommented, Jan 23, 2020

At this point it’s more of a technical remnant. Initially our interactive window and notebook editors were tied more to one session / kernel. Since the Remote URI setting was a general VSCode setting it made more sense then to apply it to a new session starting up, as you wouldn’t want a general settings change to blow away a notebook that you were working with by changing it from local to remote.

We’ve expanded our UI more so that you can change kernels in the interactive window or notebook editors. But the remote setting is still in the old system of having to change a setting and restart. We’re actually considering how to better handle remote URI moving forward so it’s not tied to a setting anymore (so you could have multiple workbooks in progress where some are local and some are on different machines). You can see our progress on that work item here: https://github.com/microsoft/vscode-python/issues/9488

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reconnecting remote Jupyter Notebook and get current cell ...
I'm currently training a neural network on a remote server, using jupyter notebook. I set it up with the following: tmux. jupyter-notebook --no ......
Read more >
Running a notebook server
The Jupyter notebook web application is based on a server-client structure. The notebook server uses a two-process kernel architecture based on ZeroMQ, as...
Read more >
DataSpell - Manage Jupyter notebook servers - JetBrains
Select Connect to Jupyter server using URL and enter the target Jupyter server address in the Server URL field. Click Add. Connecting to...
Read more >
Running Jupyter Notebooks on Remote Servers
I execute the jupyter notebook command with the --no-browser flag to start the Jupyter notebook with launching a browser since the remote server ......
Read more >
Working with Jupyter Notebooks in Visual Studio Code
Connect to a remote Jupyter server; Debug a Jupyter Notebook. Setting up your environment. To work with Python in Jupyter Notebooks, you must...
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