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

webio-jupyterlab-provider broken with JupyterLab v4 #514

Open
baumgold opened this issue Jan 24, 2024 · 8 comments
Open

webio-jupyterlab-provider broken with JupyterLab v4 #514

baumgold opened this issue Jan 24, 2024 · 8 comments

Comments

@baumgold
Copy link

The bug

It appears that the webio-jupyterlab-provider extension is incompatible with JupyterLab v4.0.8

Context

When I upgraded to JupyterLab v4.0.8 the webio-jupyterlab-provider stopped working (notice the "X"):

$ jupyter labextension list
JupyterLab v4.0.8
~/miniconda3/share/jupyter/labextensions
        webio-jupyterlab-provider v0.1.0 enabled  X (python, webio_jupyter_extension)
        @jupyter-widgets/jupyterlab-manager v5.0.9 enabled OK (python, jupyterlab_widgets)
        @jupyter-notebook/lab-extension v7.0.6 enabled OK


   The following extensions are outdated:
        webio-jupyterlab-provider

   Consider checking if an update is available for these packages.

After I downgraded back to JupyterLab v3.6.7 the extension started working again (notice the "OK"):

JupyterLab v3.6.7
~/miniconda3/share/jupyter/labextensions
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        @jupyter-widgets/jupyterlab-manager v5.0.9 enabled OK (python, jupyterlab_widgets)

Julia info:

julia> Pkg.status("WebIO")
Status `~/.julia/environments/v1.10/Project.toml`
  [0f1e0344] WebIO v0.8.21

julia> versioninfo()
Julia Version 1.10.0
Commit 3120989f39b (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 48 × Intel(R) Xeon(R) Gold 6136 CPU @ 3.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake-avx512)
  Threads: 5 on 48 virtual cores
Environment:
  JULIA_NUM_THREADS = 4
@andrew-at-rotor
Copy link

I experienced the same thing with jupyterlab v4 and julia 1.9.3. After downgrading to jupyterlab 3.6.7, I see that the extension is "OK" but see

The WebIO Jupyter extension was not detected

when using PlotlyJS in the REPL.

Do you see this error with using julia 1.10?

@baumgold
Copy link
Author

baumgold commented Feb 2, 2024

@andrew-at-rotor - I somehow managed to get my system into the same state as you. Julia v1.10 with WebIO v0.8.21 and JupyterLab v3.6.7. jupyter labextension list says the webio-jupyterlab-provider is 'enabled OK' but when I try to use it from Jupyterlab notebook I get:

WebIO not detected.

Please read [the troubleshooting guide](https://juliagizmos.github.io/WebIO.jl/latest/troubleshooting/not-detected/) for more information on how to resolve this issue.

https://juliagizmos.github.io/WebIO.jl/latest/troubleshooting/not-detected/

It's unclear to me what part of my system is problematic.

@archisman-panigrahi
Copy link

I came across this issue in Arch Linux. As workaround is to use the package jupyter-nbclassic, with which this package is compatible.

@kdheepak
Copy link

kdheepak commented Mar 2, 2024

There's a number of breaking changes in Jupyter Lab 4.

https://jupyterlab.readthedocs.io/en/latest/extension/extension_migration.html#api-breaking-changes

When I open the console I get these errors:

image
image

This particular error might be easy to fix (based on https://discourse.jupyter.org/t/model-metadata-get-is-not-a-function/19758):

the API has changed in this respect between jlab 3 and 4

you should now use model.getMetadata()
as well as similarly setMetadata() and deleteMetadata()

But I'm not sure how many more breaking changes are there.

I naively tried to run the upgrade extension to start working on a PR but got different errors in every folder.

https://jupyterlab.readthedocs.io/en/latest/extension/extension_migration.html#upgrading-extension-using-the-upgrade-script

I can try to help with this change to get it working, but I don't have any experience in jupyter lab extensions. Can anyone offer some direction on how to go about this?

@kdheepak
Copy link

I wanted to give a friendly bump on this thread. Currently no widgets work in jupyter v4 e.g. JuliaGizmos/Interact.jl#421

I have some time I can put toward looking into this this week, but I'm coming in with no knowledge of jupyter widgets or even observables. If someone can offer some insight that'd be great!

@paulnakroshis
Copy link

This is my biggest issue with Jupyterlab --- no working widgets. I am using the jupyterlab-desktop app and If I try to make a plot with a slider, the plot displays but without a slider. This is why I end up using Pluto notebooks when I need this capability. Does ANYONE know if a fix is in the works? This is a hugely useful feature to have....

@gmantegna
Copy link

@twavv @rdeits @shashi bumping this issue again. With the latest jupyter lab (4.2.4), WebIO (0.8.21), and webio-jupyterlab-provider (0.1.0), running on an ARM Mac, webio-jupyterlab-provider does not seem to install properly (see attached output from "jupyter labextension list"), and attempting to make a plot with PlotlyJS results in an error, "WebIO not detected" (see other attachment for full error). Are there any WebIO developers available to fix this? Alternatively, I am confident coding in Julia and Python but not JavaScript or anything like that, so if someone can point me to where the likely issue is I am happy to take a look at fixing it myself, but I am not experienced enough with this package to be able to diagnose the issue on my own. This is quite a major issue as it means extensions such as Plotly are not compatible with any of the latest versions of Jupyter notebook/lab, so I'd love to help fix if I can.

@dlakelan
Copy link

Also hitting this. I have a collaborator and I wanted him to be able to slide some sliders and see how it moves a point cloud around (to get some parameters into a good initial condition for running an optimization). He sees the plot but not the sliders (in an Interact.jl based script utilizing WebIO under the hood.)

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

7 participants