I'am new to plotly and I'am having a problem with my plots when generating them inside jupyter notebooks.
Whenever I generate a plot, evrything works fine, but when I try to save the notebook I get an error message telling me that the notebook validation failed because it's not valid under any of the given schemas (example taken straight from the plot.ly webiste).
Here is an example:
import plotly.plotly as py
iplot([{"x": [1, 2, 3], "y": [3, 1, 6]}])
I get the following message when I try to save the notebook: Notebook Validation failed: {u'data': [{u'y': [3, 1, 6], u'x': [1, 2, 3]}], u'layout': {}} is not valid under any of the given schemas:
{
"data": [
{
"y": [
3,
1,
6
],
"x": [
1,
2,
3
]
}
],
"layout": {}
}
Thank you!
Create a new figure or activate an existing figure. Add an axes to the figure using add_axes() method. Plot the given list. Save the plot using savefig() method.
Both ! and % allow you to run shell commands from a Jupyter notebook. % is provided by the IPython kernel and allows you to run "magic commands", many of which include well-known shell commands. ! , provided by Jupyter, allows shell commands to be run within cells.
JupyterLab Problems In order to use plotly in JupyterLab, you must have the jupyterlab-plotly extension installed as detailed in the Getting Started guide. When you install plotly , this extension is automatically made available to any JupyterLab 3. x installation in the same Python environment.
Saving a Jupter notebook Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the save icon and your notebook edits are saved.
The ploty team fixed the issue, here is the ticket
Upgrading nbformat, with either
pip install --upgrade nbformat
or
conda update nbformat
fixes it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With