Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unreadable Notebook NotJSONError('Notebook does not appear to be JSON: u\'{\\n "cells": [\\n {\\n "cell_type": "...',)

Tags:

Getting this very strange error when I am trying to load my ipython notebook. Never had it before, and I cannot to my recollection, remember having done anything silly with ipython:

Unreadable Notebook: /path/to/notebooks/results.ipynb NotJSONError('Notebook does not appear to be JSON: u\'{\\n "cells": [\\n  {\\n   "cell_type": "...',) 

which is followed by

400 GET /api/contents/results.ipynb?type=notebook&_=1440010858974 (127.0.0.1) 36.17ms referer=http://localhost:8888/notebooks/results.ipynb 
like image 377
Astrid Avatar asked Aug 19 '15 19:08

Astrid


People also ask

How do I open an unreadable Jupyter Notebook?

The easiest way to recover corrupted Jupyter notebook files, whether it contains text or not (size = 0KB), is to go to the project folder and display the hidden files. Once the hidden files are displayed, you will see a folder named '. ipynb_checkpoints'. Simply open this folder and take the file you want!

How do I update my Jupyter Notebook?

Use pip install notebook --upgrade or conda upgrade notebook to upgrade to the latest release. We strongly recommend that you upgrade to version 9+ of pip before upgrading notebook . Use pip install pip --upgrade to upgrade pip. Check pip version with pip --version .


1 Answers

Save yourself a headache. Open your .ipynb in any online JSON validator and it will tell you which lines have issues. I used this one.

like image 175
crypdick Avatar answered Sep 18 '22 13:09

crypdick