Skip to content

jsonschema.SchemaError when a figure is validated #692

@empet

Description

@empet

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions