vscode: "Failed to save 'x' file name is not supported by Jupyter.."
Environment data
- VS Code version: 1.59
- Jupyter Extension version (available under the Extensions sidebar): v2021.8.1195043623
- Python Extension version (available under the Extensions sidebar): v2021.8.1105858891
- OS (Windows | Mac | Linux distro) and version: Ubuntu 20.04.2 LTS
- Python and/or Anaconda version: 3.6.10
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Jupyter server running: Local | Remote | N/A
Expected behaviour
Saving a notebook through any means (ctrl+s, menu option, closing) saves the notebook file
Actual behaviour
File is not saved, and error generated:
_"Failed to save ‘Untitled-2’: File name file:///home/matt/Documents/Coding/Temporary/Untitled-2 is not supported by Jupyter.
Please make sure the file name matches following patterns:"_
(no patterns are listed)
Notes:
- Saving .ipynb using the old jupyter (i.e. opening ipynb with ‘Jupyter Notebook (custom)’ works fine.
- Specifying the .ipynb extension does not resolve the issue.
- Re-installing anaconda & vs code did not resolve the issue
Steps to reproduce:
- Create a new notebook
- Attempt to save
- enter any filename, with or without *.ipynb extension included
Logs
Error message generated:
"Failed to save ‘Untitled-2’: File name file:///home/matt/Documents/Coding/Temporary/Untitled-2 is not supported by Jupyter.
Please make sure the file name matches following patterns:"
Changing logging level in json settings to debug with “python.logging.level”: “debug”, the following output is generated when ctrl+shift+p creating new jupyter notebook. (No output is generated when attempting to save)
Output for Jupyter
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Jupyter
)
Info 2021-08-09 10:03:29: Attempting to start a server because of preload conditions ...
Info 2021-08-09 10:03:29: No controller, hence notebook communications cannot be initialized for editor untitled:Untitled-2?jupyter-notebook
Info 2021-08-09 10:03:29: No controller, hence notebook communications cannot be initialized for editor untitled:Untitled-3?jupyter-notebook
Info 2021-08-09 10:03:29: Find preferred kernel for untitled:Untitled-3?jupyter-notebook with metadata {"orig_nbformat":4,"language_info":{"name":"python"}} & preferred interpreter {"sysPrefix":"/home/matt/venv/tf","envType":"Venv","envName":"tf","envPath":"/home/matt/venv/tf","path":"/home/matt/venv/tf/bin/python","architecture":3,"sysVersion":"3.8.5 (default, Sep 4 2020, 07:30:14) \n[GCC 7.3.0]","version":{"raw":"3.8.5","major":3,"minor":8,"patch":5,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.5 64-bit ('tf': venv)"}
Info 2021-08-09 10:03:29: findPreferredKernel score for R is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.6.10 64-bit ('uni21': conda) is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.6.10 64-bit ('uni21': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.6.10 64-bit ('uni21': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.6.13 64-bit ('uni21-dw': conda) is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.6.13 64-bit ('uni21-dw': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.6.13 64-bit ('uni21-dw': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.8.10 64-bit is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.8.10 64-bit is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.8.10 64-bit is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.8.10 64-bit is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.8.10 64-bit is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.8.10 64-bit is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.8.11 64-bit ('pytorch': conda) is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.8.11 64-bit ('pytorch': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.8.11 64-bit ('pytorch': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for speclanguage=python, Python 3.8.5 64-bit ('base': conda) is -1
Info 2021-08-09 10:03:29: findPreferredKernel score for Python3, Python 3.8.5 64-bit ('base': conda) is 2
Info 2021-08-09 10:03:29: findPreferredKernel score for Python 3.8.5 64-bit ('base': conda) is 2
Info 2021-08-09 10:03:29: findKernel found Python 3.6.10 64-bit ('uni21': conda)
Info 2021-08-09 10:03:29: Find kernel spec, Class name = C, completed in 85ms, has a truthy return value, Arg 1: <Uri:Untitled-3>, Arg 2: {"orig_nbformat":4,"language_info":{"name":"python"}}, Arg 3: {"_isCancelled":false,"_emitter":{"_disposed":false,"_listeners":{"_first":{"next":{},"prev":{}},"_last":{"next":{},"prev":{}},"_size":1}}}, Return Value: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/matt/miniconda3/envs/uni21/share/jupyter/kernels/python3/kernel.json","interpreterPath":"/home/matt/miniconda3/envs/uni21/bin/python","name":"python3610jvsc74a57bd0dd2ec671bb630594c5f38c98786ec99faa967eccf37ce8165d36bd20380bf8bb","argv":["/home/matt/miniconda3/envs/uni21/bin/python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"/home/matt/miniconda3/envs/uni21/bin/python","display_name":"Python 3.6.10 64-bit ('uni21': conda)","metadata":{"originalSpecFile":"/home/matt/miniconda3/envs/uni21/share/jupyter/kernels/python3/kernel.json","interpreter":{"sysPrefix":"/home/matt/miniconda3/envs/uni21","envType":"Conda","envName":"uni21","envPath":"/home/matt/miniconda3/envs/uni21","path":"/home/matt/miniconda3/envs/uni21/bin/python","architecture":3,"sysVersion":"3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 23:51:54) \n[GCC 7.3.0]","version":{"raw":"3.6.10","major":3,"minor":6,"patch":10,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.6.10 64-bit ('uni21': conda)"}}},"interpreter":{"sysPrefix":"/home/matt/miniconda3/envs/uni21","envType":"Conda","envName":"uni21","envPath":"/home/matt/miniconda3/envs/uni21","path":"/home/matt/miniconda3/envs/uni21/bin/python","architecture":3,"sysVersion":"3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 23:51:54) \n[GCC 7.3.0]","version":{"raw":"3.6.10","major":3,"minor":6,"patch":10,"build":[],"prerelease":["final","0"]},"companyDisplayName":"Anaconda, Inc.","displayName":"Python 3.6.10 64-bit ('uni21': conda)"},"id":".jvsc74a57bd0dd2ec671bb630594c5f38c98786ec99faa967eccf37ce8165d36bd20380bf8bb./home/matt/miniconda3/envs/uni21/bin/python./home/matt/miniconda3/envs/uni21/bin/python.-m#ipykernel_launcher"}
Info 2021-08-09 10:03:29: PreferredConnection: .jvsc74a57bd0dd2ec671bb630594c5f38c98786ec99faa967eccf37ce8165d36bd20380bf8bb./home/matt/miniconda3/envs/uni21/bin/python./home/matt/miniconda3/envs/uni21/bin/python.-m#ipykernel_launcher found for NotebookDocument: untitled:Untitled-3?jupyter-notebook
Info 2021-08-09 10:03:29: TargetController found ID: .jvsc74a57bd0dd2ec671bb630594c5f38c98786ec99faa967eccf37ce8165d36bd20380bf8bb./home/matt/miniconda3/envs/uni21/bin/python./home/matt/miniconda3/envs/uni21/bin/python.-m#ipykernel_launcher for document untitled:Untitled-3?jupyter-notebook
Info 2021-08-09 10:03:29: Setting controller affinity for untitled:Untitled-3?jupyter-notebook .jvsc74a57bd0dd2ec671bb630594c5f38c98786ec99faa967eccf37ce8165d36bd20380bf8bb./home/matt/miniconda3/envs/uni21/bin/python./home/matt/miniconda3/envs/uni21/bin/python.-m#ipykernel_launcher
Info 2021-08-09 10:03:29: Loading kernelspec from /home/matt/venv/tf/share/jupyter/kernels/python3/kernel.json for /home/matt/venv/tf/bin/python
Info 2021-08-09 10:03:29: Kernel python3811jvsc74a57bd0f797775adc104d2988247382ac07740c8526bddb50b338fb5618b34d51cdb062 matches Python 3.8.11 64-bit ('pytorch': conda) based on path in argv.
Info 2021-08-09 10:03:29: Kernel python3613jvsc74a57bd0f5f464bb2a47eeb3aaaa4b07962a97b31f59079138663ef7a0ebf17bbd14fafe matches Python 3.6.13 64-bit ('uni21-dw': conda) based on path in argv.
Info 2021-08-09 10:03:29: Kernel python385jvsc74a57bd0f058d5705f98133aa9e69187a97eb281265854ad7c0ac9317c71dd4168e827ee matches Python 3.8.5 64-bit ('tf': venv) based on interpreter path.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 17 (5 by maintainers)
@bpasero my problem come out just as i update the VSC to newest version with the new simple notebook model
@ZellDD Awesome, thanks for the help! I removed the json & removed code, turns out I had installed it via snap originally, probably following this, so checked what kind of things snap keeps around and removed that too:
snap saved
snap forget 1
(there was only 1 snapshot, for code)sudo apt-get install code:amd64=1.58.2-1626302803
And it works fine… I was curious, so I repeated the steps (minus snapshot) and installed 1.59… Also works! So maybe the snapshot config / json file was causing grief? Though I had tried cleaning the settings.json file previously, but not sure…I solved the problem on windows by reinstalling vs code, just make sure to delete everything before the new installation as explained here: https://debug.to/1074/how-to-uninstall-vs-code-completely
Sup, basically i had the same issue. By deleting the settings.json of my user, purging vs code and reinstalling, the problem was solved for me. I cant say the solution is to delete the settings.json file because i tried to reproduce it with the previous .json. The problem occured by updating from 1.58.2 to 1.59. Im using pop!os so this might only work for deb users:
cd .config/Code/User
, open directoryrm settings.json
, deleted filesudo apt-get purge code
After this process the file extension was added to the new file, which wasnt there before. I already tried to add it manually ahead of reinstalling,didnt work for me. In my experience u cant add the file extension manually, maybe i did type it in false… Correct me if im wrong 😄 .