Vscode-jupyter: Opening one jupyter notebook causes opening of others previously used .ipynb files

Created on 18 Aug 2020  路  4Comments  路  Source: microsoft/vscode-jupyter

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Close a window with opened jupyter notebook tabs
  2. Open a new window and open one of the notebooks

Imgur

Actual behavior

Hello! I am using VScode to work on the remote server using conda environments and jupyter notebooks. I noticed that when I close the window with jupyter notebook tabs, the next time I open the window and try to open one notebook, the whole bunch of notebooks opens as well and it gets really laggy for a moment. Currently "files.hotExit" : "off", so I expect the tabs to be closed when the window is closed.

Expected behavior

When the window is closed, all the tabs are closed as well. When a new window is opened after it, there should not be any tabs, and opening one jupyter notebook causes the opening of only one tab.

Your Jupyter and/or Python environment

_Please provide as much info as you readily know_

  • Jupyter server running: Remote
  • Extension version: 2020.08.101144
  • VS Code version: 1.48
  • Setting python.jediEnabled: false
  • Setting python.languageServer: Pylance
  • Python and/or Anaconda version: Python 3.7.7 and Anaconda 4.8.3
  • OS: Linux
  • Virtual environment: conda

Python Output

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

bug

All 4 comments

@schatt89 The hotExit setting actually only controls saving of unsaved files on exit. The behavior that you are seeing is the intended behavior in that the notebooks that you had opened in that vscode workspace / folder are reopened when you reopen that folder. This is consistent with how VS Code handles files. It might just look a bit different as since our extension only handles these ipynb files it doesn't reopen them until something triggers the python extension to load.

This is consistent with how VS Code handles files. It might just look a bit different as since our extension only handles these ipynb files it doesn't reopen them until something triggers the python extension to load.

I think a problem is user could be working on non python files for a while (hence extension isn't activated), then 1/2 hour later they open a python file and now automatically a number of ipynb files get opened

@IanMatthewHuff thank you for the reply! Well, I guess manually closing all tabs before closing the window is the only way to prevent this from happening.

@DonJayamanne yes, that's also the case sometimes!

Thanks for your feedback. This issue will be addressed once VS Code adds native support for editing notebooks. Please see https://github.com/microsoft/vscode/issues/91987.

Was this page helpful?
0 / 5 - 0 ratings