Reputation: 182
I currently manage a group of graduate student researchers for whom this is happening across multiple platforms (PC Windows 10 and 11, Mac). Our workflow is to work off of .ipynb templates, renaming them specific to different oceanography and geoscience projects. We are not a developing group or a coding group; I write the packages and my students and technicians use them to the best of their ability - hence the Jupyter notebook template workflow.
For about 2 months none of us can use Save As to change the name and directory of a .ipynb template. There is simply no option to save the file as an .ipynb file.
There is no easy workaround. We cannot save as .py files because we get the attached error. We get the same error if we try to save as the default (.json).
Briefly, after a full uninstall and re-install as recommended here, I was able to see a different one-line dialog box that allowed me to save to a different directory and with a different file name. This has now disappeared after 3 days. Thus, the fix suggested by @IanHuff in the link above seems only to be temporary. I would like to find out if this is a bug that will be fixed, or if there is a coding way we can work around this issue. Command line in the terminal? Anything? It should be noted that the answer
Thank you.
Upvotes: 1
Views: 7763
Reputation: 1
If anyone is still looking for an answer. Download Python 3.9 from the Microsoft store Link here and then run vscode using the 3.9 Kernel rather than the one you currently have installed.
You can switch your Python Kernel in the top right:
Then run a jupyter notebook file and install any additional components needed for Python 3.9. Then after that you should be able to save as a jupyter notebook file .ipynb as shown below:
Upvotes: 0
Reputation: 894
You should be able to either not change the dropdown selection (leave it as json), or select "no extension". Either way, use a .ipynb extension on the filename and it should save as a notebook file successfully
edit: until github.com/microsoft/vscode-jupyter/issues/9626 is fixed, you should be able to set the dropdown to "no extension" and erase the ".json" from the file name as a workaround.
Upvotes: 1