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
WGLMakie does not work within mybinder.org - no plot appears #2405
Comments
You can use |
That sounds more difficult than expected. I was thinking that some dependencies might be missing. I have no clue about the binder internals unfortunately. I indeed want to update the plots via Observables, so I guess that the offline=true variant does not work for me here.
EDIT: @SimonDanisch is there more documentation on how to configure JSServe for WGLMakie? |
I thought it might already be possible with https://jupyter-server-proxy.readthedocs.io/ Looking here https://jupyter-server-proxy.readthedocs.io/en/latest/arbitrary-ports-hosts.html I made a hacky and failing first attempt was to do like so. I'm documenting it just in case it helps: https://github.com/frankier/wglmakie_binder
Executing the notebook I get the following in the Javascript debug console
At least part of the problem is that THREE is not successfully injected into the page. This solution is likely to be janky since there can only be a single listener on a single socket, and this listener is controlled by code running in a single notebook, however the notebook server can serve multiple notebooks. I guess a better solution would be to hook into Jupyter notebook directly without trying to open a socket. Perhaps either WGLMakie or JSServe could have an option inject Javascript via WebIO.jl or similar when available? |
I guess that means, that the websocket connection works, but not the file serving. |
In that case I get a different problem which is things never finish loading. Since everything is getting injected directly into the Jupyter notebook it looks like a lot of things go wrong. Eventually I get this for the last cell:
The problem seems to stem from an error in some code which is executed and cannot see JSServe. Here is the code:
The definition of JSServe is however loaded and available on window.JSServe from the js console. So this is either an execution order problem or a different global context is being used for this snippet. I have managed to get things working in iframe mode rather than Page() mode however. Details forthcoming. |
Okay take a look at these: https://mybinder.org/v2/gh/frankier/wglmakie_binder/HEAD?labpath=demo.ipynb https://mybinder.org/v2/gh/frankier/wglmakie_binder/HEAD?labpath=app_demo.ipynb What works:
What needs to be done to stabilise this approach?
Another possibility which might make this more robust than using ports is if JSServe could use a unix domain socket e.g. in a temp directory, and we can extend jupyter-server-proxy to allow us to address these the same way as ports. See this issue in jupyter-server-proxy jupyterhub/jupyter-server-proxy#321 |
I guess the |
This JSServe.jl PR SimonDanisch/Bonito.jl#118 should move things forward a bit, and then we can see if it's possible to improve upon the jupyter-server-proxy approach |
This should be possible now, but @frankier possibly knows better what exactly is needed to make it work. |
I've been trying to test the new version, but tbh mybinder.org is so flaky for me that it's pretty much impossible to test |
Ah yeah, true... I've been trying to start a julia session for a few weeks and gave up as well.... |
Hi there,
I just tried using Makie.jl, especially WGLMakie.jl and while it works locally within VSCode, which is awesome, it fails on mybinder.org.
There is no error message, the plot just won't appear. On Chrome nothing appears, on Firefox I get a
Not Found
This is a link to my example notebook which I wanted to work https://mybinder.org/v2/gh/galleon/scikit-decide/julia-jolin?filepath=notebooks-jupyter/01-introduction-maze.ipynb
It is defined within the
notebooks-juypter
directory of this branch https://github.com/galleon/scikit-decide/tree/julia-jolinAny help about is highly appreciated
The text was updated successfully, but these errors were encountered: