1

I am using jupyterlite which is JupyterLab distribution that runs entirely in the browser. However, after clearing the browser history, the files are no more visible.

Please let me know how can I retrieve the *ipynb files from my windows machine. I have already checked %AppData% and I don't see any *ipynb files.

Wayne
  • 6,607
  • 8
  • 36
  • 93
meallhour
  • 13,921
  • 21
  • 60
  • 117
  • I don't think they were ever on your machine. They were probably stored in an S3 bucket somewhere and linked to you via browser cookies – Paul H Apr 29 '22 at 19:16
  • 1
    At Paul H, the notebooks were definitely only on the local machine. They aren't saved as files per se to the computer running Jupyterlite. They are in your browser cache or browser IndexDB that isn't directly accessible from your machine's GUI. Please only use JupyterLite for testing and toy uses. It is unofficial and experimental at this time, as spelled out [here](https://jupyter.org/try) and [here](https://jupyterlite.readthedocs.io/en/latest/). – Wayne Apr 29 '22 at 21:11

1 Answers1

4

The files are stored in well... the browser. Specifically in the IndexDB or localStorage. This means that the physical location on the disk will depend entirely on the browser that you use, rather than on the operating system, and will likely be inaccessible (for an average user) without decoding binary blobs.

For example, in Chrome you can check the path to the application data using chrome://version/ (under Profile Path) and in that directory there should be IndexedDB folder. Then you need to find a sub-folder depending on the domain in which you accessed JupyterLite, for example https_jupyterlite.readthedocs.io_0.indexeddb.leveldb, and there you will find a LevelDB database file with .ldb extension and a MANIFEST file (with the pointer to the current version in the CURRENT file. The details of how to extract the blobs are outside of scope for this answer, but have a look at How to access Google Chrome's IndexedDB/LevelDB files?.

However, you can use files from your file system directly in JupyterLite without worrying about in-browser technologies with the jupyterlab-filesystem-access extension which uses File System Access API however this API is not available on Firefox yet.

As noted by @Wayne all of this is still quite experimental (both as in "using the newest browser APIs" and "the team of developers is still figuring way forward, please help by providing kind feedback and contributing").

krassowski
  • 13,598
  • 4
  • 60
  • 92
  • 2
    @meallhour you may want to open an issue in https://github.com/jupyterlite/jupyterlite asking to add a note in the README/docs which would warn users that they may loose their files if they clear the browser history. Honestly, I am somewhat surprised that it removes the database files rather than browsing history alone, but it might be browser-specific behaviour. – krassowski Apr 29 '22 at 21:24