-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notebooks are sometimes corrupted (made unloadable in Jupyter or Jupyter Lab) #2487
Comments
For #9386 * Use notebook cell factory for cell manipulation * Add news entry * Fix formatting * Oopsy * Fix linter issues * Code review comments * Fix failing tests * Fixes to auto save * Fix linter issues
I'm validating using microsoft/vscode-python#9385 and microsoft/vscode-python#8772 since those have specifics and this is general. |
Validate |
I'm still having issues with this. I had a weird import error on pandas (referenced DLL and numpy), previously I was able to fix it by exiting the notebook and reloading it. When I exited out of it I accepted the prompt to save changes, and then I could no longer open the file. After I deleted the JSON for the first cell that contained the import and error I was able to open it again. Edit - I can provide both of the files for comparison if they are of interest. Here is the cell that broke it |
@JamesDConley Thanks for helping to report this issue. Could you please open up a new issues here in the vscode-jupyter repo with your info? This older issue was for a specific corruption cause, so I don't want to reactive the old bug for a new and probably different issue. A new issue will help us look into this. |
We might need to create a notebook builder to ensure we never corrupt the notebook file.
This would be responsible for editing/creating notebook JSON (e.g. create a new cell that returns the JSON or inserts a new cell into the specific spot, edits a cell by appending the output...).
By corrupt i mean, our code creates/modifes an ipynb file such that:
We seem to do this every once in a while (incorrectly formatted html/markdown, or the like).
Issues I've seen:
See https://nbformat.readthedocs.io/en/latest/api.html#nbformat.validate
Suggestions:
any
and the re-casting to hide compiler warnings.@rchiodo @IanMatthewHuff @DavidKutu Thoughts
The text was updated successfully, but these errors were encountered: