Hi,
I’m teaching a course and one of my students has run into a NotJSONError(‘Notebook does not appear to be JSON: u’{\n “cells”: [\n {\n “cell_type”: "…’,). The notebook in question is SIR_model.ipynb. I came across a StackOverFlow thread which pointed me to checking the notebook’s JSON validity using a JSON validator. The validator says there’s an error near the end of the file (at position 16996). However, looking through the file with a text editor, I couldn’t see any issues with the JSON format: no unnecessary commas, open-ended quotes or brackets or braces, etc. I then preceded to check a bunch of notebooks I’ve created. None of them are considered valid JSON by this validator. Finally, I created an empty notebook, and it too was invalid JSON. The empty notebook is
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
I don’t see why there should be any problem with this. If I copy and paste the text from any of the notebooks into the validator, it says it’s valid. But when uploading the file, it says it isn’t. For what it’s worth, I’m using JupyterLab 3.1.7 to create these notebooks.
I’ve suggested they try restarting JupyterLab. Is there any other solution to this?
Thanks,
Zach