Description
Description
Unable to get ipywidget web3 example working
(Other notes: I posted this on discourse here https://discourse.jupyter.org/t/unable-to-get-ipywidget-web3-example-working/16601, but have had no response so far).
Reproduce
- create and activate a new conda environment
- clone ipywidgets
- follow the ]setup instructions for the example “web3”](https://github.com/jupyter-widgets/ipywidgets/tree/master/examples/web3#try-it)
- try opening the webpage (http://localhost:8080) in firefox, chrome or safari.
- Check that the default value of the "Notebook BASEURL" matches the value given when starting the notebook server and then press OK.
- A blank page is shown in the browser. (See JS Console output from each browser below).
Additionally, I have tried git checkout tags/8.0.2
immediately after cloning the repo (step 2) without effect.
I have tried recreating this several times and always get the same result. I do not have an opinion on whether this is an error is the web3 example itself or the documentation describing it.
Expected behaviour
Some visual indication of a widget being successfully loaded in the webpage.
Context
-
ipywidgets version
8.0.2
-
Operating System and version:
macOS 12.6.1 (21G217) -
Browser and version:
Google Chrome Version 107.0.5304.87 (Official Build) (arm64)
Firefox 106.0.3 (64-bit) -
Others (if required)
yarn --version ==> 1.22.19
conda --version ==> 22.9.0
Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here. You may want to sanitize the paths in the output.$PATH:
</my/absolute/home>/anaconda3/envs/ipywidgets-test/bin
</my/absolute/home>/.cargo/bin
/opt/homebrew/opt/tcl-tk/bin
</my/absolute/home>/bin/google-cloud-sdk/bin
~/.gem/ruby/2.6.0/bin
/opt/local/bin
/opt/local/sbin
</my/absolute/home>/.poetry/bin
/opt/homebrew/bin
/opt/homebrew/sbin
</my/absolute/home>/.pyenv/shims
</my/absolute/home>/.pyenv/bin
</my/absolute/home>/anaconda3/condabin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/opt/X11/bin
/usr/local/anaconda3/binsys.path:
</my/absolute/home>/anaconda3/envs/ipywidgets-test/bin
</my/absolute/home>/anaconda3/envs/ipywidgets-test/lib/python311.zip
</my/absolute/home>/anaconda3/envs/ipywidgets-test/lib/python3.11
</my/absolute/home>/anaconda3/envs/ipywidgets-test/lib/python3.11/lib-dynload
</my/absolute/home>/anaconda3/envs/ipywidgets-test/lib/python3.11/site-packagessys.executable:
</my/absolute/home>/anaconda3/envs/ipywidgets-test/bin/pythonsys.version:
3.11.0 | packaged by conda-forge | (main, Oct 25 2022, 06:24:51) [Clang 14.0.4 ]platform.platform():
macOS-12.6.1-x86_64-i386-64bitwhich -a jupyter:
</my/absolute/home>/anaconda3/envs/ipywidgets-test/bin/jupyter
</my/absolute/home>/.pyenv/shims/jupyterpip list:
Package Version
----------------------------- -----------
anyio 3.6.2
appnope 0.1.3
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.1.0
attrs 22.1.0
Babel 2.11.0
backcall 0.2.0
backports.functools-lru-cache 1.6.4
beautifulsoup4 4.11.1
bleach 5.0.1
brotlipy 0.7.0
certifi 2022.9.24
cffi 1.15.1
charset-normalizer 2.1.1
cryptography 38.0.3
debugpy 1.6.3
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
executing 1.2.0
fastjsonschema 2.16.2
flit_core 3.8.0
idna 3.4
importlib-metadata 5.0.0
importlib-resources 5.10.0
ipykernel 6.17.0
ipython 8.6.0
ipython-genutils 0.2.0
ipywidgets 8.0.2
jedi 0.18.1
Jinja2 3.1.2
json5 0.9.5
jsonschema 4.17.0
jupyter_client 7.4.4
jupyter_core 4.11.2
jupyter-server 1.23.0
jupyterlab 3.5.0
jupyterlab-pygments 0.2.2
jupyterlab_server 2.16.2
jupyterlab-widgets 3.0.3
MarkupSafe 2.1.1
matplotlib-inline 0.1.6
mistune 2.0.4
nbclassic 0.4.8
nbclient 0.7.0
nbconvert 7.2.3
nbformat 5.7.0
nest-asyncio 1.5.6
notebook 6.5.2
notebook_shim 0.2.2
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
pip 22.3.1
pkgutil_resolve_name 1.3.10
prometheus-client 0.15.0
prompt-toolkit 3.0.32
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
Pygments 2.13.0
pyOpenSSL 22.1.0
pyparsing 3.0.9
pyrsistent 0.19.2
PySocks 1.7.1
python-dateutil 2.8.2
pytz 2022.6
pyzmq 24.0.1
requests 2.28.1
Send2Trash 1.8.0
setuptools 65.5.1
six 1.16.0
sniffio 1.3.0
soupsieve 2.3.2.post1
stack-data 0.6.0
terminado 0.17.0
tinycss2 1.2.1
tomli 2.0.1
tornado 6.2
traitlets 5.5.0
typing_extensions 4.4.0
urllib3 1.26.11
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.4.2
wheel 0.38.3
widgetsnbextension 4.0.3
zipp 3.10.0conda list:
# packages in environment at </my/absolute/home>/anaconda3/envs/ipywidgets-test:
#
# Name Version Build Channel
anyio 3.6.2 pyhd8ed1ab_0 conda-forge
appnope 0.1.3 pyhd8ed1ab_0 conda-forge
argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py311h5547dcb_3 conda-forge
asttokens 2.1.0 pyhd8ed1ab_0 conda-forge
attrs 22.1.0 pyh71513ae_1 conda-forge
babel 2.11.0 pyhd8ed1ab_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 py_2 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.11.1 pyha770c72_0 conda-forge
bleach 5.0.1 pyhd8ed1ab_0 conda-forge
brotlipy 0.7.0 py311h5547dcb_1005 conda-forge
bzip2 1.0.8 h0d85af4_4 conda-forge
ca-certificates 2022.9.24 h033912b_0 conda-forge
certifi 2022.9.24 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py311ha86e640_2 conda-forge
charset-normalizer 2.1.1 pyhd8ed1ab_0 conda-forge
cryptography 38.0.3 py311h61927ef_0 conda-forge
debugpy 1.6.3 py311h814d153_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
flit-core 3.8.0 pyhd8ed1ab_0 conda-forge
idna 3.4 pyhd8ed1ab_0 conda-forge
importlib-metadata 5.0.0 pyha770c72_1 conda-forge
importlib_resources 5.10.0 pyhd8ed1ab_0 conda-forge
ipykernel 6.17.0 pyh736e0ef_0 conda-forge
ipython 8.6.0 pyhd1c38e8_1 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
ipywidgets 8.0.2 pypi_0 pypi
jedi 0.18.1 pyhd8ed1ab_2 conda-forge
jinja2 3.1.2 pyhd8ed1ab_1 conda-forge
json5 0.9.5 pyh9f0ad1d_0 conda-forge
jsonschema 4.17.0 pyhd8ed1ab_0 conda-forge
jupyter_client 7.4.4 pyhd8ed1ab_0 conda-forge
jupyter_core 4.11.2 py311h6eed73b_0 conda-forge
jupyter_server 1.23.0 pyhd8ed1ab_0 conda-forge
jupyterlab 3.5.0 pyhd8ed1ab_0 conda-forge
jupyterlab-widgets 3.0.3 pypi_0 pypi
jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_server 2.16.2 pyhd8ed1ab_0 conda-forge
libcxx 14.0.6 hccf4f1f_0 conda-forge
libffi 3.4.2 h0d85af4_5 conda-forge
libsodium 1.0.18 hbcb3906_1 conda-forge
libsqlite 3.39.4 ha978bb4_0 conda-forge
libzlib 1.2.13 hfd90126_4 conda-forge
markupsafe 2.1.1 py311h5547dcb_2 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
mistune 2.0.4 pyhd8ed1ab_0 conda-forge
nbclassic 0.4.8 pyhd8ed1ab_0 conda-forge
nbclient 0.7.0 pyhd8ed1ab_0 conda-forge
nbconvert 7.2.3 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.2.3 pyhd8ed1ab_0 conda-forge
nbconvert-pandoc 7.2.3 pyhd8ed1ab_0 conda-forge
nbformat 5.7.0 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h96cf925_1 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
notebook 6.5.2 pyha770c72_1 conda-forge
notebook-shim 0.2.2 pyhd8ed1ab_0 conda-forge
openssl 3.0.7 hfd90126_0 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pandoc 2.19.2 h694c41f_1 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 22.3.1 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge
prometheus_client 0.15.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.32 pyha770c72_0 conda-forge
psutil 5.9.4 py311h5547dcb_0 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pygments 2.13.0 pyhd8ed1ab_0 conda-forge
pyopenssl 22.1.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
pyrsistent 0.19.2 py311h5547dcb_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.11.0 h559f36b_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.16.2 pyhd8ed1ab_0 conda-forge
python_abi 3.11 2_cp311 conda-forge
pytz 2022.6 pyhd8ed1ab_0 conda-forge
pyzmq 24.0.1 py311habfacb3_1 conda-forge
readline 8.1.2 h3899abd_0 conda-forge
requests 2.28.1 pyhd8ed1ab_1 conda-forge
send2trash 1.8.0 pyhd8ed1ab_0 conda-forge
setuptools 65.5.1 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.0 pyhd8ed1ab_0 conda-forge
soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge
stack_data 0.6.0 pyhd8ed1ab_0 conda-forge
terminado 0.17.0 pyhd1c38e8_0 conda-forge
tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge
tk 8.6.12 h5dbffcc_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.2 py311h5547dcb_1 conda-forge
traitlets 5.5.0 pyhd8ed1ab_0 conda-forge
typing_extensions 4.4.0 pyha770c72_0 conda-forge
tzdata 2022f h191b570_0 conda-forge
urllib3 1.26.11 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
webencodings 0.5.1 py_1 conda-forge
websocket-client 1.4.2 pyhd8ed1ab_0 conda-forge
wheel 0.38.3 pyhd8ed1ab_0 conda-forge
widgetsnbextension 4.0.3 pypi_0 pypi
xz 5.2.6 h775f41a_0 conda-forge
zeromq 4.3.4 he49afe7_1 conda-forge
zipp 3.10.0 pyhd8ed1ab_0 conda-forgeconda env:
name: ipywidgets-test
channels:
- conda-forge
- defaults
dependencies:
- anyio=3.6.2=pyhd8ed1ab_0
- appnope=0.1.3=pyhd8ed1ab_0
- argon2-cffi=21.3.0=pyhd8ed1ab_0
- argon2-cffi-bindings=21.2.0=py311h5547dcb_3
- asttokens=2.1.0=pyhd8ed1ab_0
- attrs=22.1.0=pyh71513ae_1
- babel=2.11.0=pyhd8ed1ab_0
- backcall=0.2.0=pyh9f0ad1d_0
- backports=1.0=py_2
- backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
- beautifulsoup4=4.11.1=pyha770c72_0
- bleach=5.0.1=pyhd8ed1ab_0
- brotlipy=0.7.0=py311h5547dcb_1005
- bzip2=1.0.8=h0d85af4_4
- ca-certificates=2022.9.24=h033912b_0
- certifi=2022.9.24=pyhd8ed1ab_0
- cffi=1.15.1=py311ha86e640_2
- charset-normalizer=2.1.1=pyhd8ed1ab_0
- cryptography=38.0.3=py311h61927ef_0
- debugpy=1.6.3=py311h814d153_1
- decorator=5.1.1=pyhd8ed1ab_0
- defusedxml=0.7.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- executing=1.2.0=pyhd8ed1ab_0
- flit-core=3.8.0=pyhd8ed1ab_0
- idna=3.4=pyhd8ed1ab_0
- importlib-metadata=5.0.0=pyha770c72_1
- importlib_resources=5.10.0=pyhd8ed1ab_0
- ipykernel=6.17.0=pyh736e0ef_0
- ipython=8.6.0=pyhd1c38e8_1
- ipython_genutils=0.2.0=py_1
- jedi=0.18.1=pyhd8ed1ab_2
- jinja2=3.1.2=pyhd8ed1ab_1
- json5=0.9.5=pyh9f0ad1d_0
- jsonschema=4.17.0=pyhd8ed1ab_0
- jupyter_client=7.4.4=pyhd8ed1ab_0
- jupyter_core=4.11.2=py311h6eed73b_0
- jupyter_server=1.23.0=pyhd8ed1ab_0
- jupyterlab=3.5.0=pyhd8ed1ab_0
- jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
- jupyterlab_server=2.16.2=pyhd8ed1ab_0
- libcxx=14.0.6=hccf4f1f_0
- libffi=3.4.2=h0d85af4_5
- libsodium=1.0.18=hbcb3906_1
- libsqlite=3.39.4=ha978bb4_0
- libzlib=1.2.13=hfd90126_4
- markupsafe=2.1.1=py311h5547dcb_2
- matplotlib-inline=0.1.6=pyhd8ed1ab_0
- mistune=2.0.4=pyhd8ed1ab_0
- nbclassic=0.4.8=pyhd8ed1ab_0
- nbclient=0.7.0=pyhd8ed1ab_0
- nbconvert=7.2.3=pyhd8ed1ab_0
- nbconvert-core=7.2.3=pyhd8ed1ab_0
- nbconvert-pandoc=7.2.3=pyhd8ed1ab_0
- nbformat=5.7.0=pyhd8ed1ab_0
- ncurses=6.3=h96cf925_1
- nest-asyncio=1.5.6=pyhd8ed1ab_0
- notebook=6.5.2=pyha770c72_1
- notebook-shim=0.2.2=pyhd8ed1ab_0
- openssl=3.0.7=hfd90126_0
- packaging=21.3=pyhd8ed1ab_0
- pandoc=2.19.2=h694c41f_1
- pandocfilters=1.5.0=pyhd8ed1ab_0
- parso=0.8.3=pyhd8ed1ab_0
- pexpect=4.8.0=pyh1a96a4e_2
- pickleshare=0.7.5=py_1003
- pip=22.3.1=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
- prometheus_client=0.15.0=pyhd8ed1ab_0
- prompt-toolkit=3.0.32=pyha770c72_0
- psutil=5.9.4=py311h5547dcb_0
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.21=pyhd8ed1ab_0
- pygments=2.13.0=pyhd8ed1ab_0
- pyopenssl=22.1.0=pyhd8ed1ab_0
- pyparsing=3.0.9=pyhd8ed1ab_0
- pyrsistent=0.19.2=py311h5547dcb_0
- pysocks=1.7.1=pyha2e5f31_6
- python=3.11.0=h559f36b_0_cpython
- python-dateutil=2.8.2=pyhd8ed1ab_0
- python-fastjsonschema=2.16.2=pyhd8ed1ab_0
- python_abi=3.11=2_cp311
- pytz=2022.6=pyhd8ed1ab_0
- pyzmq=24.0.1=py311habfacb3_1
- readline=8.1.2=h3899abd_0
- requests=2.28.1=pyhd8ed1ab_1
- send2trash=1.8.0=pyhd8ed1ab_0
- setuptools=65.5.1=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sniffio=1.3.0=pyhd8ed1ab_0
- soupsieve=2.3.2.post1=pyhd8ed1ab_0
- stack_data=0.6.0=pyhd8ed1ab_0
- terminado=0.17.0=pyhd1c38e8_0
- tinycss2=1.2.1=pyhd8ed1ab_0
- tk=8.6.12=h5dbffcc_0
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.2=py311h5547dcb_1
- traitlets=5.5.0=pyhd8ed1ab_0
- typing_extensions=4.4.0=pyha770c72_0
- tzdata=2022f=h191b570_0
- urllib3=1.26.11=pyhd8ed1ab_0
- wcwidth=0.2.5=pyh9f0ad1d_2
- webencodings=0.5.1=py_1
- websocket-client=1.4.2=pyhd8ed1ab_0
- wheel=0.38.3=pyhd8ed1ab_0
- xz=5.2.6=h775f41a_0
- zeromq=4.3.4=he49afe7_1
- zipp=3.10.0=pyhd8ed1ab_0
- pip:
- ipywidgets==8.0.2
- jupyterlab-widgets==3.0.3
- widgetsnbextension==4.0.3
prefix: </my/absolute/home>/anaconda3/envs/ipywidgets-test
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.$ jupyter lab
[I 2022-11-09 17:04:48.004 ServerApp] jupyterlab | extension was successfully linked.
[I 2022-11-09 17:04:48.010 ServerApp] nbclassic | extension was successfully linked.
[I 2022-11-09 17:04:48.210 ServerApp] notebook_shim | extension was successfully linked.
[I 2022-11-09 17:04:48.258 ServerApp] notebook_shim | extension was successfully loaded.
[I 2022-11-09 17:04:48.259 LabApp] JupyterLab extension loaded from </my/absolute/home>/anaconda3/envs/ipywidgets-test/lib/python3.11/site-packages/jupyterlab
[I 2022-11-09 17:04:48.259 LabApp] JupyterLab application directory is </my/absolute/home>/anaconda3/envs/ipywidgets-test/share/jupyter/lab
[I 2022-11-09 17:04:48.261 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-11-09 17:04:48.264 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-11-09 17:04:48.266 ServerApp] Serving notebooks from local directory: </my/absolute/home>/code/long-nlp/ipywidgets/examples/web3
[I 2022-11-09 17:04:48.267 ServerApp] Jupyter Server 1.23.0 is running at:
[I 2022-11-09 17:04:48.267 ServerApp] http://localhost:8888/lab?token=<my_token>
[I 2022-11-09 17:04:48.267 ServerApp] or http://127.0.0.1:8888/lab?token=<my_token>
[I 2022-11-09 17:04:48.267 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-11-09 17:04:48.281 ServerApp]To access the server, open this file in a browser: file://</my/absolute/home>/Library/Jupyter/runtime/jpserver-9300-open.html Or copy and paste one of these URLs: http://localhost:8888/lab?token=<my_token> or http://127.0.0.1:8888/lab?token=<my_token>
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[I 2022-11-09 17:04:51.789 LabApp] Build is up to date
Browser Output
Paste the output from your browser Javascript console here.Firefox:
16:40:16.584 This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “”.
127.0.0.1:8080
16:40:16.901 Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools react-dom.development.js:26244
16:40:16.955 strict mode: use allowUnionTypes to allow union type keyword at "#/properties/state/additionalProperties/properties/buffers/items/properties/path/items" (strictTypes) util.js:175
16:40:16.958 Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content. index.js:7
16:40:19.930 Uncaught (in promise) ReferenceError: process is not defined
makeSettings serverconnection.js:156
makeSettings serverconnection.js:53
index.js:15
serverconnection.js:156Chrome
util.js:175 strict mode: use allowUnionTypes to allow union type keyword at "#/properties/state/additionalProperties/properties/buffers/items/properties/path/items" (strictTypes)
checkStrictMode @ util.js:175
serverconnection.js:156 Uncaught (in promise) ReferenceError: process is not defined
at Object.makeSettings (serverconnection.js:156:1)
at Object.makeSettings (serverconnection.js:53:1)
at HTMLDocument. (index.js:15:28)
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 (Not Found)
If using JupyterLab
- JupyterLab version:
Installed Labextensions
Paste the output from your command line running `jupyter labextension list`.jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments) @jupyter-widgets/jupyterlab-manager v5.0.3 enabled OK (python, jupyterlab_widgets)