-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Plots don't display in Jupyter with WebIO v0.8.1 #278
Comments
Thanks @halleysfifthinc for letting us know and for doing some homework on it. Very helpful. perhaps @travigd or @shashi know why recent WebIO changes would have broken things? |
Few diagnostic questions.
$ ls $(jupyter --data-dir)/nbextensions/webio
main.js Thanks! |
This is in Jupyter notebook, launched from terminal with I have the same contents of the webio nbextension as above:
|
I don't see anything like that. This is all I see, but this is before anything is run:
|
Hi @halleysfifthinc Are you running this in jupyterlab or the notebook? if you are running in jupyterlab try installing the jupyterlab plotly extension as noted in the just published update to the readme of this repo. That still doesn't quite fix the WebIO in jupyter problem (so you won't be able to do cool WebIO dependent things like update a chart was already displayed or assign julia callbacks to plot events), but at least you'll be able to see your plots |
I know this should have run on its own, but could you try again after running |
@sglyon, this is in Jupyter notebook, not jupyterlab. For the moment, everything is working fine for me with WebIO pinned at v0.7.0; plots show up fine with that version. @shashi I said in the first comment that I switched between the two mentioned environments (the difference between the two being WebIO v0.7.0 and WebIO v0.8.1) and built everything (WebIO included) before starting the Jupyter server. |
I have the same problem as the OP (in jupyter notebook) in v0.8.1, and working in v0.7.0. @travigd @shashi try find me on the Julia slack if you want to more interactively debug this. |
This was supposed to be solved after WebIO updated to 0.8.2. Look at this. But PlotlyJS 0.12.4 has a dependency of WebIO 0.8.1, and this needs to be updated. |
@DhruvaSambrani in the Project.toml for PlotlyJS 0.12.4 it looks like the requirement is WebIO version at least 0.8.0. I don't see a 0.8.1 anywhere, could I be missing it? If I'm not missing anything, then I suppose an |
Yes sorry, it's not a problem with PlotlyJS but instead with WebIO. They haven't released the 0.8.2 and 0.8.3 packages publicly yet. I'm opening an issue there. Let's see how it goes! |
I've updated WebIO to the latest version (v0.8.4),
and
with no plot. Are we absolutely sure its a WebIO issue? Because other WebIO objects are rendering perfectly |
might be an issue with how we use WebIO here. @travigd any idea? |
The WebIO not detected method implies that nothing WebIO related is getting rendered. |
If you get
|
Ah - there is an issue here. There needs to be a
I thought we had some logic to try to do this automatically in WebIO (basically define a method for |
The result of
|
thanks for working on this issue! I tried to switch to @travigd 's WebIO branch Unfortunately, I still can not see any plot, I got this message in the browser console:
|
I am having a similar issue. No plot shows up in my Jupyter notebooks. Any advice on what to do?
Command to start notebook:
In the Chrome developer console: Screenshot of notebook: |
#285 addresses this problem and has been merged. Would people here be willing to test out the latest master? I could not reproduce the issue, so having another test would be helpful (Thanks @travigd for the fix and @DhruvaSambrani for testing already)! Either when I get another positive report or a day or two has passed I'll release a new version, whichever happens first Thanks! |
Let me give it a try! |
Happy to report this is working now! Problem fixed. Here are some screenshots. There are still a couple of minor warnings but it looks benign.
Chrome Console messages Julia Version 1.1.1 |
Thanks! |
The example works for me too, but not for my more complex app 😞. The console shows this:
The last three errors seem unrelated? When I paste the URLs in the browser it works fine. I did the ritual: |
Grr I thought we had solved this one. Is there any way you can create a minimal example from your more complex app that we could look at? It’s hard to diagnose without seeing code |
@cstjean are you using it with Plots? That still doesn't work |
No, I'm using it directly, but it's fairly involved. I'll do a MWE when I get the time, which might be in September... |
Actually - it works in Jupyter notebook, but not in Jupyterlab. Also, as Dhruva said - it works only if used directly, but not via Plots. |
it doesn't work in classical jupyter notebook either. I tried now in a jupyter notebook this code
But when I executed |
@Masacroso you need to update to PlotlyJS 0.12.5 |
getting the same issues now ungrade doesn't work |
Executed plot in Jupyter Notebook but gives blank output. What to do ? |
What Julia and PlotlyJS.jl version are you working with? |
PlotlyJS => v"0.14.1" |
It works with Julia 1.6.0 and the same PlotlyJS version. I installed the last Julia version a few days before, and it worked with 1.5.2. too. Have you plotted with the same configuration before or this is the first trial? |
Same issue on Julia 1.6.2, with IJulia v1.23.2, WebIO v0.8.15, and PlotlyJS v0.18.7 The webio extension is installed:
|
@diegozea Can you try updating to the latest WebIO and installing the new Jupyter extension? https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/ |
I have updated it, and it works! Thanks! :) |
Upon updating WebIO to v0.8.1 from v0.7.0, plots no longer display/mount in Jupyter. This is reproducible (for me) in a clean environment with only IJulia and PlotlyJS added.
With
] st
ofrunning
using IJulia
andplot(scatter(;y=rand(50)))
doesn't show any plot. (In the Firefox developer console, running the plot cell produces a "Jupyter WebIO extension detected, not mounting.")After pinning Webio to v0.7.0, running those same commands in jupyter does produce a plot. (And I can see several XHR requests for JS files being made which don't happen with WebIO at v0.8.1.)
I also tried this with on PlotlyJS master with WebIO v0.8.1 which didn't work (no plot).
The text was updated successfully, but these errors were encountered: