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

Native Notebook -- switching tabs causes kernel to restart (in wrong working dir) #733

Closed
ajasja opened this issue Aug 21, 2020 · 5 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@ajasja
Copy link

ajasja commented Aug 21, 2020

Bug: Native Notebook -- switching tabs causes kernel to restart (in wrong working dir)

Steps to cause the bug to occur

  1. Open a notebook using "Open in preview Notebook Editor"
  2. Open a .py file
  3. Execute some cells in the notebook an save.
%load_ext autoreload
%autoreload 2
%matplotlib inline
from glob import glob
import os; print(os.getcwd())
import socket; print(socket.gethostname())
  1. Go to the py file and back to the notebook quickly

Actual behavior

A switching kernel notification quickly pops up and the kernel is restarted in the wrong working directory.

switch_kernel

Expected behavior

The kernel should not restart or change working directory.

Your Jupyter and/or Python environment

  • Jupyter server running: Remote
  • Extension version: v2020.8.103604
  • VS Code version: 1.49.0-insider (user setup)
  • Setting python.languageServer: pylance
  • Python and/or Anaconda version: 3.7.8
  • OS: Windows and Linux
  • Virtual environment: conda

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

@DonJayamanne
Copy link
Contributor

Extension version: v2020.8.103604

Please could you ensure you have the latest insider version of the python extension.
Doesn't look like you do.

@ajasja
Copy link
Author

ajasja commented Aug 21, 2020

Sorry, I thought I was up to date:)

I switched to the python insiders daily and installed v2020.9.103436-dev, (and restarted everything), but then the python extension did not activate (and Jupyter notebooks do not open at all in the editor). Changing back to v2020.8.103604 solved the problem.

What version should I install (and is there something I'm dong wrong?)

@ajasja
Copy link
Author

ajasja commented Aug 21, 2020

The error I get is that I can't even select the interpreter in v2020.9.103436-dev.
image

@ajasja
Copy link
Author

ajasja commented Aug 21, 2020

It seems to be a remote SSH issue, the v2020.9.103436-dev works in local. Should I open a different issue for this?

@ajasja
Copy link
Author

ajasja commented Aug 25, 2020

Can not reproduce the kernel switching behavior in v2020.9.104154-dev.

@ajasja ajasja closed this as completed Aug 25, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 11, 2020
@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug ds-vscode-notebook labels Nov 11, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2021
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
Projects
None yet
Development

No branches or pull requests

2 participants