Saving invalid kernelspec
See original GitHub issueI’m simply re-raising issue #2423. I do not know why it was closed, nor why the conversation there was locked; no solution to the problem is given in that issue.
This is relevant for me because I’m using VSCode to edit Jupyter notebooks, then using Jupyter Book to compile those notebooks into a book. Since that uses nbconvert
, the same problem arises.
But much more generally, the problem is rather serious, in that VSCode is setting kernelspecs that it seems only VSCode will ever be able to understand. It’s taking Jupyter notebooks that are usable by a huge variety of tools and secretly converting them to only being usable within VSCode (!?). If it needs to set the kernelspec to a secret giant hash that works only within VSCode, fine, go ahead and do that in memory, but why save that data to the filesystem? Obviously VSCode can recreate such hashes any time it opens the file, so it doesn’t have any actual need to change the kernelspec on disk, and doing so only destroys compatibility with every other notebook-related tool.
My current workflow is literally opening the .ipynb
files in vim and manually fixing the metadata after I save it with VSCode, or alternatively opening up my SCM app and reverting those few lines manually after every save (!).
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Ah, I see, I’m not on insiders at the moment. I can wait for it to propagate into the main build. Thank you for the very fast reply!
Thanks for the confirmation, closing in favor of #5612