-
Notifications
You must be signed in to change notification settings - Fork 952
Closed
Labels
resolved-lockedClosed issues are locked after 30 days inactivity. Please open a new issue for related discussion.Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Milestone
Description
Background
I've been working on adding JupyterLab ipywidget support (In addition to the working notebook ipywidget support) to the this WIP plotly.py branch (plotly/plotly.py#942), and I'm running into a problem.
Problem (Bug?)
A custom-built local widget can't be displayed in the same jupyterlab notebook as a built-in widget provided by @jupyter-widgets/jupyterlab-manager
Simplified Example
Steps to reproduce
- Create a fresh conda environment for Python 3.6. Install jupyterlab into the environment using pip
$ conda create -n jupyterlab_widget python=3.6
$ source activate jupyterlab_widget
$ pip install jupyterlab
- Follow jupyter widget cookiecutter instructions here to create a new widget named
jlwidget
$ pip install cookiecutter
$ cookiecutter https://github.com/jupyter/widget-cookiecutter.git
- Build the widget
$ cd jlwidget/
$ python setup.py build
$ pip install -e .
- Install widget for notebook
$ jupyter nbextension enable --py widgetsnbextension
$ jupyter nbextension install --py --symlink --sys-prefix jlwidget
$ jupyter nbextension enable --py --sys-prefix jlwidget
- Test in classic notebook. Create an
IntSlider
in the first cell and aHelloWorld
widget in the second cell. Both display properly.
$ jupyter notebook
- Build/install for jupyterlab. Note: my understanding is that
@jupyter-widgets/jupyterlab-manager
needs to be installed to view any widgets in JupyterLab and to view theIntSlider
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
$ jupyter labextension install js
- Test in jupyterlab. Execute the same notebook shown above. The
HelloWorld
widget displays fine but there is an error displaying theIntSlider
$ jupyter lab
Here is the error in the chrome developer console
- Disable the
jlwidget
widget, and repeat the experiment. Now theIntSlider
displays fine, and theHelloWorld
widget does not (as I expected)
$ jupyter labextension disable jlwidget
Environment details
(jupyterlab_widget) measejm1@measejm1-ml1 ~/Programming/PyDataStack/repos/scratch/jlwidget $ conda list
# packages in environment at /Users/measejm1/anaconda/envs/jupyterlab_widget:
#
# Name Version Build Channel
appnope 0.1.0 <pip>
arrow 0.12.1 <pip>
backcall 0.1.0 <pip>
binaryornot 0.4.4 <pip>
bleach 2.1.3 <pip>
bqplot 0.10.5 <pip>
ca-certificates 2018.03.07 0
certifi 2018.1.18 py36_0
chardet 3.0.4 <pip>
click 6.7 <pip>
cookiecutter 1.6.0 <pip>
decorator 4.3.0 <pip>
entrypoints 0.2.3 <pip>
future 0.16.0 <pip>
html5lib 1.0.1 <pip>
idna 2.6 <pip>
ipykernel 4.8.2 <pip>
ipython 6.3.1 <pip>
ipython-genutils 0.2.0 <pip>
ipywidgets 7.2.1 <pip>
jedi 0.12.0 <pip>
Jinja2 2.10 <pip>
jinja2-time 0.2.0 <pip>
jlwidget 0.1.0a0 <pip>
jsonschema 2.6.0 <pip>
jupyter-client 5.2.3 <pip>
jupyter-core 4.4.0 <pip>
jupyterlab 0.32.0 <pip>
jupyterlab-launcher 0.10.5 <pip>
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libedit 3.1 hb4e282d_0
libffi 3.2.1 h475c297_4
MarkupSafe 1.0 <pip>
mistune 0.8.3 <pip>
nbconvert 5.3.1 <pip>
nbformat 4.4.0 <pip>
ncurses 6.0 hd04f020_2
notebook 5.4.1 <pip>
numpy 1.14.2 <pip>
openssl 1.0.2o h26aff7b_0
pandas 0.22.0 <pip>
pandocfilters 1.4.2 <pip>
parso 0.2.0 <pip>
pexpect 4.5.0 <pip>
pickleshare 0.7.4 <pip>
pip 9.0.3 py36_0
poyo 0.4.1 <pip>
prompt-toolkit 1.0.15 <pip>
ptyprocess 0.5.2 <pip>
Pygments 2.2.0 <pip>
python 3.6.5 hc167b69_0
python-dateutil 2.7.2 <pip>
pytz 2018.4 <pip>
pyzmq 17.0.0 <pip>
readline 7.0 hc1231fa_4
requests 2.18.4 <pip>
Send2Trash 1.5.0 <pip>
setuptools 39.0.1 py36_0
simplegeneric 0.8.1 <pip>
six 1.11.0 <pip>
sqlite 3.22.0 h3efe00b_0
terminado 0.8.1 <pip>
testpath 0.3.1 <pip>
tk 8.6.7 h35a86e2_3
tornado 5.0.2 <pip>
traitlets 4.3.2 <pip>
traittypes 0.0.6 <pip>
urllib3 1.22 <pip>
wcwidth 0.1.7 <pip>
webencodings 0.5.1 <pip>
wheel 0.31.0 py36_0
whichcraft 0.4.1 <pip>
widgetsnbextension 3.2.1 <pip>
xz 5.2.3 h0278029_2
zlib 1.2.11 hf3cbc9b_2
Metadata
Metadata
Assignees
Labels
resolved-lockedClosed issues are locked after 30 days inactivity. Please open a new issue for related discussion.Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.