Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JupyterLab incompatibility #182

Closed
staticfloat opened this issue Feb 27, 2018 · 7 comments
Closed

JupyterLab incompatibility #182

staticfloat opened this issue Feb 27, 2018 · 7 comments

Comments

@staticfloat
Copy link
Contributor

staticfloat commented Feb 27, 2018

When attempting to use this from within JupyterLab 0.31.8, I get the following error:

[E 13:13:40.410 LabApp] Notebook JSON is invalid: Additional properties are not allowed (u'source' was unexpected)
    
    Failed validating u'additionalProperties' in display_data:
    
    On instance[u'cells'][0][u'outputs'][0]:
    {u'data': {u'text/html': u'<script charset="utf-8" type=\'text/javascript\'>\n
...
<many thousands of lines of javascript>
...
<p>To load again call <pre>init_notebook(true)</pre></p>\n\n'},
     u'metadata': {},
     u'output_type': u'display_data',
     u'source': u'julia'}

I assume this is due to problems with the source key in that JSON payload that is being sent; although I personally don't know where that is being generated. This error occurs on the latest master of IJulia and PlotlyJS.

@sglyon
Copy link
Member

sglyon commented Feb 27, 2018

I've seen this before too. I think the problem is inside IJulia on this line

I wonder if deleting that line fixes it?

@staticfloat
Copy link
Contributor Author

Yes, it does, but now I just don't see anything. :(

@sglyon
Copy link
Member

sglyon commented Feb 27, 2018

Did you install the jupyterlab plotly renderer?

https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/plotly-extension

I need to figure out an approach for how to do that automatically

@staticfloat
Copy link
Contributor Author

staticfloat commented Feb 28, 2018

Ah, no! I did not! After installing nodejs and then running jupyter labextension install @jupyterlab/plotly-extension, we are good to go!

It's too bad that you need a whole nodejs install and an npm build tree to compile all that together.

@staticfloat
Copy link
Contributor Author

Wait, no, I'm wrong. It still doesn't work. :/

@staticfloat
Copy link
Contributor Author

This looks like it might be useful info though:

screen shot 2018-02-27 at 5 12 27 pm

@sglyon
Copy link
Member

sglyon commented Feb 28, 2018

That error is expected, but in jupyterlab it should be benign.

The reason for it is that in the notebook I communicate between PlotlyJS.jl and plotly.js via the plotlyjs_eval comm. In Jupyterlab I display plots by talking to the @juptyerlab/plotly-extension that you installed above.

As long as that is installed you will still see errors in the js console, but plots should show up.

As we spoke over in slack -- this did resolve the issue so I'm going to close here.

@sglyon sglyon closed this as completed Feb 28, 2018
staticfloat added a commit to JuliaLang/IJulia.jl that referenced this issue Mar 2, 2018
This does not seem to be supported in JupyterLab 0.31.  See this link
[0] for more detail

[0] JuliaPlots/PlotlyJS.jl#182 (comment)
stevengj pushed a commit to JuliaLang/IJulia.jl that referenced this issue Mar 2, 2018
This does not seem to be supported in JupyterLab 0.31.  See this link
[0] for more detail

[0] JuliaPlots/PlotlyJS.jl#182 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants