12

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!

3 Answers 3

10

The ploty team fixed the issue, here is the ticket

Upgrading nbformat, with either

pip install --upgrade nbformat

or

conda update nbformat

fixes it.

Sign up to request clarification or add additional context in comments.

Comments

7

I got the same problem but the @gerard's answer didn't help me. I tried then conda update --all but this didn't help too.

Later I was given the link: https://gitmemory.com/issue/jupyter/nbformat/161/574959380. So, I opened ipynb file with text editor, replaced "nbformat_minor": 1 with "nbformat_minor": 4 and saved the file. After reloading the notebook the problem was fixed.

Comments

1

As in gerard's answer pip install --upgrade nbformat solved the issue, however conda (which I tried before pip) didn't solve the issue.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.