plotly plots in jupyter notebooks: Validation fails when saving

时光毁灭记忆、已成空白 提交于 2019-12-21 11:35:53

问题


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!


回答1:


The ploty team fixed the issue, here is the ticket

Upgrading nbformat, with either

pip install --upgrade nbformat

or

conda update nbformat

fixes it.



来源:https://stackoverflow.com/questions/42285255/plotly-plots-in-jupyter-notebooks-validation-fails-when-saving

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!