-
Notifications
You must be signed in to change notification settings - Fork 11
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
Widgets not rendering when using jupyterlite-pyodide-kernel #86
Comments
The way it fails is surprising to me. I suspect one of the widgets libraries you are installing is requesting a wrong version of ipywidgets (putting my bet on ipyevents, could you try removing it from your requirements?). |
Hmm I tried creating a more minimal environment and removing the pins:
Still getting the same issue. I did notice locally that voici seems to be looking for the pyodide kernel at a nested url. So it is looking for:
rather than:
but I'm pretty sure that is unrelated I also tried running regular voila and I was getting the same errors there. If I bump down the voila version to 0.4.3 the widgets are ok in voila, but voici doesn't work at all. Here is my env dump:
|
Indeed voici needs an alpha release of Voila (it's still very much work in progress). I wonder if jupyterlite-pyodide-kernel isn't looking in some weird places for the lab extensions, leading to mismatching versions. Would you get more luck using jupyterlite-xeus-python instead? |
Yeah that is what I originally thought as well, but it doesn't seem to explain why using regular voila=0.5.0a4 in regular jupyterlab with ipykernel also has the same error.
Yes that's where I started. But I had just originally wrote the notebook in jupyterlite with a pyodide kernel and when switching to xeus-python I ran into a few issues:
|
I'll have to investigate this. This should not be the case. |
Thank you! Let me know if you need any more information. Just to reiterate the widget rendering was failing with voila=0.5.0a4, but succeeding with voila=0.4.3 |
I can reproduce. It looks like I have very bad memory because I did fix it in the specific Voici + jupyterlite-xeus-python case a couple of weeks ago https://github.com/voila-dashboards/voici/blob/main/voici/addon.py#L33 by pinning both ipywidgets AND jupyterlab_widgets (the frontend package). This is a very nasty workaround that should go away. Anyway, the issue is addressed with voila=0.5.0a5. We need to rebuild Voici against that version of Voila for it to be resolved in Voici. Then we can remove the nasty workaround in the Voici codebase. Problem is we are stuck with voila=0.5.0a4 while jupyterlite still builds against JupyterLab 3. But this should be resolved by jupyterlite/jupyterlite#1019. Sorry for the whole mess. But again, Voici is still very much work in progress and not stabilized, same for Voila 0.5.0 alpha. TLDR: pin ipywidgets=8.0.6 and jupyterlab_widgets=3.0.7 for now, while waiting for official Voila=0.5.0 and jupyterlite=2.0.0 |
Yes! I am super excited to push on this and see what I can get working. I really appreciate the support and hope my issues aren't too distracting. |
That worked!! https://jsignell.github.io/voici/voici/render/fires.html is rendering! |
This should be resolved now in the latest versions of Voila and Voici |
Let me just say I am not at all sure that this is the right repo to raise this in. But ipywidgets work fine in jupyterlite, so I'm not sure where else to put it.
Description
ipywidgets are not rendering when used with jupyterlite-pyodide-kernel
Reproduce
From the console log it looks like
@jupyter-widgets/base
and@jupyter-widgets/controls
are missing.Context
The notebook and requirements are in the following repo: https://github.com/jsignell/voici
The text was updated successfully, but these errors were encountered: