ipywidgets
ipywidgets copied to clipboard
Widget not rendering on JupyterLab, when starting main.py examples/app and examples/notebook
Description
Widget not rendering on JupyterLab when running main.py examples/app and examples/notebook
Reproduce
- Go to root folder after cloning https://github.com/jupyterlab/jupyterlab
- Build examples folder after installing and building all node modules
- Go to examples/app, run python main,py , open notebook type and run
import ipywidgets as widgets
widgets.Button(description="Hello")
Expected behavior
Context
- ipywidgets version: 7.6.5
- Operating System and version: Linux Ubuntu 20.04
- Browser and version: Chrome 94.0.4606.71
- Nodejs version: 14.17.4
Troubleshoot Output
Command Line Output
Paste the output from your command line running `jupyter lab` (or `jupyter notebook` if you use notebook) here, use `--debug` if possible.
Browser Output
Access to font at 'about:blank' from origin 'http://localhost:8888' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. about:blank:1 Failed to load resource: net::ERR_FAILED 3 default.js:1027 Exception opening new comm _handleCommOpen @ default.js:1027
If using JupyterLab
- JupyterLab version: 3.1.18
Installed Labextensions
JupyterLab v3.1.18 /home/erkin98/miniconda3/envs/appshell/share/jupyter/labextensions jupyter-leaflet v0.14.0 enabled OK @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)Other labextensions (built into JupyterLab) app dir: /home/erkin98/miniconda3/envs/appshell/share/jupyter/lab jupyterlab-plotly v5.3.1 enabled OK jupyterlab-system-monitor v0.7.0 enabled OK jupyterlab-topbar-extension v0.6.0 enabled OK plotlywidget v4.14.3 enabled OK
The part in the browser output seems very relevant:
default.js:1027 Exception opening new comm
_handleCommOpen @ default.js:1027
Unfortunately it seems cut off. Is there more to that output that you could include?
Looks like I'm able to replicate the issue. Running node version 14.17.4
These errors are coming from webpack://jupyterlab/packages/services/lib/kernel/default.js
.
In particular, the content.target_module
and this._targetRegistry
. However, this doesn't seem like an ipywidgets issue, rather a JupyterLab issue. Should this be moved to jupyterlab repository?
i resolved it by adding jupyterlab-manager to package.json