Jupyter extension creates countless empty ipynb (also creates "checkpoint" files after saving)
See original GitHub issueEnvironment data
- VS Code version: 1.57.1 (Universal)
- Jupyter Extension version (available under the Extensions sidebar): v2021.6.999662501
- Python Extension version (available under the Extensions sidebar): v2021.6.944021595
- OS (Windows | Mac | Linux distro) and version: macOS 11.4 Big Sur (Apple M1 platform)
- Python and/or Anaconda version: 3.8.10 (aarch64), 3.9.5 (aarch64) - homebrew
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): N/A
- Jupyter server running: Local
Expected behaviour
After saving changes in a jupyter notebook, only a single checkpoint file should be created
Actual behaviour
After saving changes in a jupyter notebook, multiple random files appear in both the directory of the jupyter notebook file and the checkpoints folder
Steps to reproduce:
- Make changes to Jupyter notebook (adding a cell with
print("Hello world")
is enough) - run the cell
- save changes
- refresh folder view and see the “junk” files
Logs
Info 2021-07-02 12:35:50: Executing cell NotebookImport#26
Info 2021-07-02 12:35:50: Waiting for jupyter server and web panel ...
Info 2021-07-02 12:35:50: Checking for server existence.
Info 2021-07-02 12:35:50: Checking for server usability.
Info 2021-07-02 12:35:50: Server not usable (should ask for install now)
Error 2021-07-02 12:35:50: Exception attempting to start notebook: [o [Error]: Jupyter cannot be started. Error attempting to locate jupyter: Select an Interpreter to start Jupyter
at S.startServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:407589)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async S.createServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:406884)
at async connect (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:90:178208)
at async D.ensureConnectionAndNotebookImpl (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:641568)
at async D.ensureConnectionAndNotebook (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:639797)
at async D.clearResult (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:635459)
at async D.reexecuteCell (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:621723)
at async D.reexecuteCells (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:618182)] {
category: 'jupyterinstall',
action: 'https://aka.ms/pyaiinstall',
actionTitle: 'Get more help'
}
Info 2021-07-02 12:35:50: Exception executing cell NotebookImport#26: [o [Error]: Jupyter cannot be started. Error attempting to locate jupyter: Select an Interpreter to start Jupyter
at S.startServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:407589)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async S.createServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:406884)
at async connect (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:90:178208)
at async D.ensureConnectionAndNotebookImpl (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:641568)
at async D.ensureConnectionAndNotebook (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:639797)
at async D.clearResult (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:635459)
at async D.reexecuteCell (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:621723)
at async D.reexecuteCells (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:618182)] {
category: 'jupyterinstall',
action: 'https://aka.ms/pyaiinstall',
actionTitle: 'Get more help'
}
Info 2021-07-02 12:35:50: Finished executing cell NotebookImport#26
Info 2021-07-02 12:35:53: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-07-02 12:35:53: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -c "import jupyter"
> /opt/homebrew/bin/python3 -c "import jupyter"
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -c "import jupyter"
> /opt/homebrew/bin/python3 -c "import jupyter"
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -c "import notebook"
> /opt/homebrew/bin/python3 -c "import notebook"
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -c "import notebook"
> /opt/homebrew/bin/python3 -c "import notebook"
Info 2021-07-02 12:35:53: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -m jupyter kernelspec --version
> /opt/homebrew/bin/python3 -m jupyter kernelspec --version
Info 2021-07-02 12:35:53: Process Execution: > /opt/homebrew/bin/python3 -m jupyter kernelspec --version
> /opt/homebrew/bin/python3 -m jupyter kernelspec --version
Error 2021-07-02 12:35:53: DataScience Error [o [Error]: Jupyter cannot be started. Error attempting to locate jupyter: Select an Interpreter to start Jupyter
at S.startServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:407589)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async S.createServer (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:54:406884)
at async connect (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:90:178208)
at async D.ensureConnectionAndNotebookImpl (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:641568)
at async D.ensureConnectionAndNotebook (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:639797)
at async D.clearResult (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:635459)
at async D.reexecuteCell (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:621723)
at async D.reexecuteCells (/Users/davidkorcak/.vscode/extensions/ms-toolsai.jupyter-2021.6.999662501/out/client/extension.js:37:618182)] {
category: 'jupyterinstall',
action: 'https://aka.ms/pyaiinstall',
actionTitle: 'Get more help'
}
Info 2021-07-02 12:35:54: Cached data exists getEnvironmentVariables, <No Resource>
Info 2021-07-02 12:35:54: Creating daemon pool for /opt/homebrew/bin/python3 with env variables count 0
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-07-02 12:35:54: Process Execution: > /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> /opt/homebrew/bin/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
More info
This bug DOES NOT manifest itself on my Windows 10 system running the same environment on x86 processor. Seems to be either macOS or macOS aarch64 exclusive. Also DOES NOT happen when using jupyter notebook web environment, only in VS Code. It has been reported multiple times already with no answers: https://stackoverflow.com/questions/64259277/vscode-jupyter-server-generates-random-ipynb-files?r=SearchResults&s=1|66.8220 https://stackoverflow.com/questions/65239027/visual-studio-code-jupyter-interactive-how-to-disable-the-automatic-creation?r=SearchResults&s=3|54.7774
Screenshots
Before After
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:42 (17 by maintainers)
Top GitHub Comments
@i3130002 @jonas-nothnagel I’m sorry you’re still running into these issues. Please could you try the following VSIX. I believe this should fix it, As always if this doesn’t work, please provide the output from the
Jupyter
output panel (please do provide all of the output).Thanks
(Note: Please extract the zip file and install the extension using the command from the command palette
Extensions: Install from VSIX
) ms-toolsai-jupyter-insiders.vsix.zipI’ve been digging a bit more into this. It always happens when creating a new local kernel for my notebooks in the Google Drive folder. This is a streaming folder, which is now the default for the Google desktop app, and it happens whether I make this folder Available Offline or not (from the dropdown that’s available in Finder after installing the Google desktop app). If sometimes happens in a local folder also, but it’s difficult to reproduce it there. So perhaps it’s a timing issue that is exposed by the different underlying filesystem.
EDIT: moreover, when using Drive for desktop in mirroring mode (as opposed to streaming mode + offline availability) its behavior seems to be similar to the local filesystem behavior. But it’s a terrible solution because it implies that my entire Google Drive is locally duplicated.