Hi guys,
I am trying to use Plotly offline with Jupyter lab and the Jupyter lab extension. Everything is smooth and works fine until I save the notebook, where it seems that the plot causes an issue in the overall Json of the notebook. I can run into the issue with the simple example:
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
iplot([{“x”: [1, 2, 3], “y”: [3, 1, 6]}])
In the shell I can see the error:
Notebook JSON is invalid: {‘x’: [1, 2, 3], ‘y’: [3, 1, 6], ‘type’: ‘scatter’, ‘uid’: ‘22e994e2-b776-11e8-800b-8c8590492a0e’} is not valid under any of the given schemas
Failed validating ‘oneOf’ in display_data[‘properties’][‘data’][‘additionalProperties’]:
On instance[‘cells’][0][‘outputs’][1][‘data’][‘0’]:
{‘type’: ‘scatter’,
‘uid’: ‘22e994e2-b776-11e8-800b-8c8590492a0e’,
‘x’: [1, 2, 3],
‘y’: [3, 1, 6]}
It does not prevent the notebook to be saved. However if one reopen the notebook, the plot is now some fixed image, some type of png is inserted in the data section of the JSON instead of the html code.
Using the regular jupyter notebook however seems to work quite well (saving a reloading notebook with offline Plotly inside)
Does anyone already run into this issue? Is there a way to fix it?
Thanks!