Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Run By Line first time when connecting to remote jupyter server #7690

Closed
Tracked by #5607
DavidKutu opened this issue Sep 27, 2021 · 3 comments
Closed
Tracked by #5607
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-run-by-line
Milestone

Comments

@DavidKutu
Copy link

Environment data

  • Version: 1.61.0-insider (user setup)
  • Commit: 5991e3c4b97eca5568069bf3e0910ab693ad3549
  • Date: 2021-09-27T05:16:11.989Z
  • Electron: 13.4.0
  • Chrome: 91.0.4472.164
  • Node.js: 14.16.0
  • V8: 9.1.269.39-electron.0
  • OS: Windows_NT x64 10.0.19043
  • Jupyter ver: build from main
  • Python ver: v2021.9.1246542782

Expected behaviour

Calling getSelectedNotebookController() returns the controller.

Actual behaviour

It returns undefined.

Steps to reproduce:

  1. Open a notebook with a local kernel
  2. Start a kernel outside of VS Code (python -m notebook)
  3. Run the command to connect to a remote kernel
  4. Paste your server link
  5. Reload VS Code as usual
  6. notebook affinity is not updated, and if we need the controller it returns undefined
  7. Reload VS Code again
  8. Now it works
@DavidKutu DavidKutu added the bug Issue identified by VS Code Team member as probable bug label Sep 27, 2021
@DavidKutu DavidKutu self-assigned this Sep 27, 2021
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Sep 28, 2021

Note: getSelectedNotebookController will only get updated after all controller have loaded and user has executed a cell.
Would be good to know at what point you are calling this API (i.e. where in the extnesion are we using this & what point in time).

notebook affinity is not updated, and if we need the controller it returns undefined

This will take time, as we need to wait for list of kernels to be fetched from remote server.

But again, it will always return undefined unless you run a cell.

@DavidKutu
Copy link
Author

gotcha, this is happening just after reloading and opening a notebook, before running.

Maybe I'll disable debugging until a controller is found

@DonJayamanne DonJayamanne changed the title INotebookControllerManager.getSelectedNotebookController() returns undefined your first time in remote Unable to use Run By Line first time when connecting to remote jupyter server Sep 28, 2021
@DavidKutu DavidKutu added this to the October 2021 milestone Sep 30, 2021
@greazer greazer modified the milestones: October 2021, On Deck Oct 8, 2021
@roblourens
Copy link
Member

Seems ok at the moment

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-run-by-line
Projects
None yet
Development

No branches or pull requests

4 participants