ipynb crash and cannot recover work

Hi,

I was recently working on an ipynb with a lot of data. Dataspell ran out of memory, and proceeded to crash. However, upon reopening Dataspell, the ipynb was empty, and is a 0 bytes on disk (attempting to open gives Unreadable Notebook: ... NotJSONError("Notebook does not appear to be JSON: ''..." error) . Local History shows no past versions saved to which I can revert the ipynb, so it appears all my work is lost? This is despite running over 100 cells successfully before the crash. Is Dataspell not using the .ipynb_checkpoints directory? As nothing was in that directory either. Any help on recovering my notebook would be greatly appreciated!

0
3 comments

If none of the above helped, I found a workaround to recover most of the changes I did since the last checkout - by simply calling this command in your notebook:

%history -g
If you want your IPython history in a plain-text file, you can export it yourself.

You can also do it for a specific filename:

%history -g -f filename 
What does -g do? – Without -g it exports the history for the current session. With -g it exports history for all sessions.

MyTHDHR Schedule

0

I recommend you to uninstall and re-install all the below items:

  • ipykernel
  • ipython
  • jupyter_client
  • jupyter_core
  • traitlets
  • ipython_genutils

Additionally, if you're going to install with conda, follow below command.

run conda clean -tipsy

This command will clean up conda caches before you start

the backrooms

0

Hi Gibson,

 I just tested these Steps. "If none of the above helped, I found a workaround to recover most of the changes I did since the last checkout - by simply calling this command in your notebook:

%history -g
If you want your IPython history in a plain-text file, you can export it yourself.

You can also do it for a specific filename:

%history -g -f filename 
What does -g do? – Without -g it exports the history for the current session. With -g it exports history for all sessions." It works perfectly. Thanks for the Solution that you shared here. pay by plate ma invoice

0

Please sign in to leave a comment.