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

Issue

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:

class="lang-none prettyprint-override">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

Solution

I just had the same issue after upgrading from IPython 0.13 (ish) to Jupyter 4.

The problem in my case were a few rogue trailing commas in the JSON, for example the comma following "outputs" in:

...
 "language": "python",
 "metadata": {},
 "outputs": [],
},

After removing the commas, Jupyter/IPython could again read the notebook (and upgraded it to version 4). I hope this helps.



Answered By - cr333
Answer Checked By - Willingham (Python.Easybugfix Volunteer)

Related Posts

Post a Comment