plotly.py: jsonschema.SchemaError when a figure is validated
Here is a minimal example that reproduces the bug: http://nbviewer.jupyter.org/gist/empet/cf922d7c7f4269d6f63432ec67a5d020
The notebook runs OK (with plotly 2.0.1) when I call plot(fig)
. iplot(fig)
generates the plot too, but an error box pops up whenever Jupyter tries to save the notebook. The box has the following content:
The save operation succeeded, but the notebook does not appear to be valid. The validation error was:
Notebook Validation failed:
u'data': [{u'colorscale': u'Viridis', u'z': [[2, 27, 105, 100], [87, 14, 121, 102], [26, 121, 73, 34], [44, 105, 111, 127]], u'type': u'heatmap', u'zsmooth': u'best'}], u'layout': {u'width': 400, u'height': 400}}
is not valid under any of the given schemas:
{ "data": [ { "colorscale": "Viridis", "z": [ [ 2, 27, 105, 100 ], [ 87, 14, 121, 102 ], [ 26, 121, 73, 34 ], [ 44, 105, 111, 127 ] ], "type": "heatmap", "zsmooth": "best" } ], "layout": { "width": 400, "height": 400 } }
Initially I formulated this issue only for heatmaps, but meanwhile I realized that this behaviour manifests for any type of plot.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 4
- Comments: 15 (4 by maintainers)
Commits related to this issue
- include nbformat as dependency to fix #692 — committed to plotly/plotly.py by chriddyp 7 years ago
- Merge pull request #699 from plotly/chriddyp-patch-1 include nbformat in `install_requires` as dependency to fix #692 — committed to plotly/plotly.py by chriddyp 7 years ago
Hi I updated nbformat to 4.3.0 and it still raises the same “validation failed” issue…
I’m running this locally on my mac, and am still seeing the issue after updating nbformat. Any ideas?
@malindho @antvig I upgrade my jupyter at the same time and the problem is solved:
pip install --upgrade jupyter