Connecting to remote jupyter server doesnt save the url for current session
See original GitHub issueThis 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]
- Run vscode
- Run the new instance of jupyter notebook from Terminal inside vscode ( this is related to microsoft/vscode-python#9665 )
- 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,
- try to run a cell , it fails.
- restart vscode for the settings to be saved
- you are back to step 2 , repeat this loop!
Logs
Output for Python
in the Output
panel (View
→Output
, 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:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
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.
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