proximacentauri
proximacentauri

Reputation: 1879

Jupyter Notebook JSON is invalid

I have installed Anaconda3 and am using an env called 'myenv'. In that env I have install ipywidgets

conda install --name myenv -c conda-forge ipywidgets

I can see that ipywidgets is installed in this env

ipywidgets                7.1.2                    py36_0    conda-forge

when I open a notebook however I get the following error each time:

Notebook validation failed: 'execution_count' is a required property:
{
 "data": {
  "text/html": "<p>Failed to display Jupyter Widget of type <code>HBox</code>.</p>\n<p>\n  If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n  that the widgets JavaScript is still loading. If this message persists, it\n  likely means that the widgets JavaScript library is either not installed or\n  not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n  Widgets Documentation</a> for setup instructions.\n</p>\n<p>\n  If you're reading this message in another frontend (for example, a static\n  rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n  it may mean that your frontend doesn't currently support widgets.\n</p>\n",
  "text/plain": "HBox(children=(IntProgress(value=0, description='Epoch', max=2), HTML(value='')))"
 },
 "metadata": {},
 "output_type": "execute_result"
}

And in the console:

Notebook JSON is invalid: 'execution_count' is a required property

Any ideas on how to fix this

Upvotes: 0

Views: 2615

Answers (1)

chamoda
chamoda

Reputation: 591

Try "Kernel -> Restart & Run All", then "File -> Save and Checkpoint"

Upvotes: 2

Related Questions