voila-dashboards / voila

Voilà turns Jupyter notebooks into standalone web applications
https://voila.readthedocs.io
Other
5.46k stars 506 forks source link

ipywidgets combobox append issue still occurs in Voila #1315

Closed ollyhensby closed 1 year ago

ollyhensby commented 1 year ago

Description

This bug is in relation to https://github.com/jupyter-widgets/ipywidgets/issues/3681.

It has been resolved in Jupyter Lab, however, setting options still appends newly set options when using voila-preview.

NOTE: The only oddity I have noticed from debugging is that there is a traceback when running jupyter lab --debug due to jupyter_server which may be the potential cause of this? I have pasted the output of this under Command Line Output below in the Context section.

Reproduce

Installed ipywidgets-test env following:

  1. conda create -n ipywidgets-test --override-channels --strict-channel-priority -c conda-forge -c anaconda jupyterlab
  2. conda activate ipywidgets-test
  3. pip install --upgrade ipywidgets

And installed voila using:

mamba install voila

The voila version installed is 0.4.0.

Output From Installing Voila
Transaction

  Prefix: /home/jovyan/mambaforge/envs/ipywidgets-test

  Updating specs:

   \- voila
   \- ca-certificates
   \- certifi
   \- openssl

  Package             Version  Build            Channel                    Size
─────────────────────────────────────────────────────────────────────────────────
  Install:
─────────────────────────────────────────────────────────────────────────────────

  \+ nbconvert          7.2.10  pyhd8ed1ab_1     conda-forge/noarch          8kB
  \+ nbconvert-pandoc   7.2.10  pyhd8ed1ab_1     conda-forge/noarch          7kB
  \+ pandoc             2.19.2  h32600fe_2       conda-forge/linux-64       27MB
  \+ voila               0.4.0  pyhd8ed1ab_0     conda-forge/noarch       Cached
  \+ websockets           10.4  py311hd4cff14_1  conda-forge/linux-64      161kB

  Downgrade:
─────────────────────────────────────────────────────────────────────────────────

  \- jupyter_client      8.1.0  pyhd8ed1ab_0     conda-forge
  \+ jupyter_client      7.4.1  pyhd8ed1ab_0     conda-forge/noarch         93kB
  \- jupyter_server      2.5.0  pyhd8ed1ab_0     conda-forge
  \+ jupyter_server     1.23.6  pyhd8ed1ab_0     conda-forge/noarch        244kB

  Summary:

  Install: 5 packages
  Downgrade: 2 packages

  Total download: 28MB

─────────────────────────────────────────────────────────────────────────────────

Created test script to show behaviour:

import ipywidgets as w
from random import randint

class TestUi(w.HBox):
    """Clicking button creates new random options of length 5
    and sets it to combobox."""
    def __init__(self):
        super().__init__()
        self.combobox = w.Combobox()
        self.btn = w.Button(description="Set Options")
        self.children = [self.btn, self.combobox]
        self.btn.on_click(self.set_options)

    def set_options(self, on_click):
        self.combobox.options = [str(randint(1, 20)) for i in range(5)]

if __name__ == "__main__":
    display(TestUi())

^This simple script sets a list of length 5 of random numbers to the combobox options when clicking on the "Set Options" button.


Running In JupyterLab (Expected Behaviour)

After clicking "Set Options" button once: image

Clicking a second time: image

This is the expected behaviour as we can see that the newly set options replace the old options.


Running In Voila (Unexpected Behaviour)

Click "Set Options" button once: image

Clicking a second time: image

As we can see, the newly set list is appended which is contradictory to the behaviour when running in Jupyter Lab.

Expected behaviour

Expect the newly set options to replace the previous options when using voila-preview.

Context

Troubleshoot Output
$PATH:
        /home/jovyan/mambaforge/envs/ipywidgets-test/bin
        /home/jovyan/mambaforge/condabin
        /usr/lib/wsl/lib

sys.path:
        /home/jovyan/mambaforge/envs/ipywidgets-test/bin
        /home/jovyan/mambaforge/envs/ipywidgets-test/lib/python311.zip
        /home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11
        /home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/lib-dynload
        /home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages

sys.executable:
        /home/jovyan/mambaforge/envs/ipywidgets-test/bin/python

sys.version:
        3.11.2 | packaged by conda-forge | (main, Mar 31 2023, 17:51:05) [GCC 11.3.0]

platform.platform():
        Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31

which -a jupyter:
        /home/jovyan/mambaforge/envs/ipywidgets-test/bin/jupyter

pip list:
        Package                       Version
        ----------------------------- -----------
        anyio                         3.6.2
        argon2-cffi                   21.3.0
        argon2-cffi-bindings          21.2.0
        asttokens                     2.2.1
        attrs                         22.2.0
        Babel                         2.12.1
        backcall                      0.2.0
        backports.functools-lru-cache 1.6.4
        beautifulsoup4                4.12.0
        bleach                        6.0.0
        brotlipy                      0.7.0
        certifi                       2022.12.7
        cffi                          1.15.1
        charset-normalizer            3.1.0
        comm                          0.1.3
        cryptography                  40.0.1
        debugpy                       1.6.6
        decorator                     5.1.1
        defusedxml                    0.7.1
        entrypoints                   0.4
        executing                     1.2.0
        fastjsonschema                2.16.3
        flit_core                     3.8.0
        idna                          3.4
        importlib-metadata            6.1.0
        importlib-resources           5.12.0
        ipykernel                     6.22.0
        ipython                       8.12.0
        ipython-genutils              0.2.0
        ipywidgets                    8.0.6
        jedi                          0.18.2
        Jinja2                        3.1.2
        json5                         0.9.5
        jsonschema                    4.17.3
        jupyter_client                7.4.1
        jupyter_core                  5.3.0
        jupyter-events                0.6.3
        jupyter-server                1.23.6
        jupyter_server_terminals      0.4.4
        jupyterlab                    3.5.0
        jupyterlab-pygments           0.2.2
        jupyterlab_server             2.22.0
        jupyterlab-widgets            3.0.7
        MarkupSafe                    2.1.2
        matplotlib-inline             0.1.6
        mistune                       2.0.5
        nbclassic                     0.5.3
        nbclient                      0.7.2
        nbconvert                     7.2.10
        nbformat                      5.8.0
        nest-asyncio                  1.5.6
        notebook                      6.5.3
        notebook_shim                 0.2.2
        packaging                     23.0
        pandocfilters                 1.5.0
        parso                         0.8.3
        pexpect                       4.8.0
        pickleshare                   0.7.5
        pip                           23.0.1
        pkgutil_resolve_name          1.3.10
        platformdirs                  3.2.0
        prometheus-client             0.16.0
        prompt-toolkit                3.0.38
        psutil                        5.9.4
        ptyprocess                    0.7.0
        pure-eval                     0.2.2
        pycparser                     2.21
        Pygments                      2.14.0
        pyOpenSSL                     23.1.1
        pyrsistent                    0.19.3
        PySocks                       1.7.1
        python-dateutil               2.8.2
        python-json-logger            2.0.7
        pytz                          2023.3
        PyYAML                        6.0
        pyzmq                         25.0.2
        requests                      2.28.2
        rfc3339-validator             0.1.4
        rfc3986-validator             0.1.1
        Send2Trash                    1.8.0
        setuptools                    67.6.1
        six                           1.16.0
        sniffio                       1.3.0
        soupsieve                     2.3.2.post1
        stack-data                    0.6.2
        terminado                     0.17.1
        tinycss2                      1.2.1
        tomli                         2.0.1
        tornado                       6.2
        traitlets                     5.9.0
        typing_extensions             4.5.0
        urllib3                       1.26.15
        voila                         0.4.0
        wcwidth                       0.2.6
        webencodings                  0.5.1
        websocket-client              1.5.1
        websockets                    10.4
        wheel                         0.40.0
        widgetsnbextension            4.0.7
        zipp                          3.15.0

conda list:
        # packages in environment at /home/jovyan/mambaforge/envs/ipywidgets-test:
        #
        # Name                    Version                   Build  Channel
        _libgcc_mutex             0.1                 conda_forge    conda-forge
        _openmp_mutex             4.5                       2_gnu    conda-forge
        anyio                     3.6.2              pyhd8ed1ab_0    conda-forge
        argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
        argon2-cffi-bindings      21.2.0          py311hd4cff14_3    conda-forge
        asttokens                 2.2.1              pyhd8ed1ab_0    conda-forge
        attrs                     22.2.0             pyh71513ae_0    conda-forge
        babel                     2.12.1             pyhd8ed1ab_1    conda-forge
        backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
        backports                 1.0                pyhd8ed1ab_3    conda-forge
        backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
        beautifulsoup4            4.12.0             pyha770c72_0    conda-forge
        bleach                    6.0.0              pyhd8ed1ab_0    conda-forge
        brotlipy                  0.7.0           py311hd4cff14_1005    conda-forge
        bzip2                     1.0.8                h7f98852_4    conda-forge
        ca-certificates           2022.12.7            ha878542_0    conda-forge
        certifi                   2022.12.7          pyhd8ed1ab_0    conda-forge
        cffi                      1.15.1          py311h409f033_3    conda-forge
        charset-normalizer        3.1.0              pyhd8ed1ab_0    conda-forge
        comm                      0.1.3              pyhd8ed1ab_0    conda-forge
        cryptography              40.0.1          py311h9b4c7bb_0    conda-forge
        debugpy                   1.6.6           py311hcafe171_0    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        6.1.0              pyha770c72_0    conda-forge
        importlib_metadata        6.1.0                hd8ed1ab_0    conda-forge
        importlib_resources       5.12.0             pyhd8ed1ab_0    conda-forge
        ipykernel                 6.22.0             pyh210e3f2_0    conda-forge
        ipython                   8.12.0             pyh41d4057_0    conda-forge
        ipython_genutils          0.2.0                      py_1    conda-forge
        ipywidgets                8.0.6                    pypi_0    pypi
        jedi                      0.18.2             pyhd8ed1ab_0    conda-forge
        jinja2                    3.1.2              pyhd8ed1ab_1    conda-forge
        json5                     0.9.5              pyh9f0ad1d_0    conda-forge
        jsonschema                4.17.3             pyhd8ed1ab_0    conda-forge
        jupyter_client            7.4.1              pyhd8ed1ab_0    conda-forge
        jupyter_core              5.3.0           py311h38be061_0    conda-forge
        jupyter_events            0.6.3              pyhd8ed1ab_0    conda-forge
        jupyter_server            1.23.6             pyhd8ed1ab_0    conda-forge
        jupyter_server_terminals  0.4.4              pyhd8ed1ab_1    conda-forge
        jupyterlab                3.5.0              pyhd8ed1ab_0    conda-forge
        jupyterlab-widgets        3.0.7                    pypi_0    pypi
        jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
        jupyterlab_server         2.22.0             pyhd8ed1ab_0    conda-forge
        ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
        libexpat                  2.5.0                hcb278e6_1    conda-forge
        libffi                    3.4.2                h7f98852_5    conda-forge
        libgcc-ng                 12.2.0              h65d4601_19    conda-forge
        libgomp                   12.2.0              h65d4601_19    conda-forge
        libnsl                    2.0.0                h7f98852_0    conda-forge
        libsodium                 1.0.18               h36c2ea0_1    conda-forge
        libsqlite                 3.40.0               h753d276_0    conda-forge
        libstdcxx-ng              12.2.0              h46fd767_19    conda-forge
        libuuid                   2.38.1               h0b41bf4_0    conda-forge
        libzlib                   1.2.13               h166bdaf_4    conda-forge
        markupsafe                2.1.2           py311h2582759_0    conda-forge
        matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
        mistune                   2.0.5              pyhd8ed1ab_0    conda-forge
        nbclassic                 0.5.3              pyh8b2e9e2_2    conda-forge
        nbclient                  0.7.2              pyhd8ed1ab_0    conda-forge
        nbconvert                 7.2.10             pyhd8ed1ab_1    conda-forge
        nbconvert-core            7.2.10             pyhd8ed1ab_1    conda-forge
        nbconvert-pandoc          7.2.10             pyhd8ed1ab_1    conda-forge
        nbformat                  5.8.0              pyhd8ed1ab_0    conda-forge
        ncurses                   6.3                  h27087fc_1    conda-forge
        nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
        notebook                  6.5.3              pyha770c72_0    conda-forge
        notebook-shim             0.2.2              pyhd8ed1ab_0    conda-forge
        openssl                   3.1.0                h0b41bf4_0    conda-forge
        packaging                 23.0               pyhd8ed1ab_0    conda-forge
        pandoc                    2.19.2               h32600fe_2    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                       23.0.1             pyhd8ed1ab_0    conda-forge
        pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
        platformdirs              3.2.0              pyhd8ed1ab_0    conda-forge
        prometheus_client         0.16.0             pyhd8ed1ab_0    conda-forge
        prompt-toolkit            3.0.38             pyha770c72_0    conda-forge
        prompt_toolkit            3.0.38               hd8ed1ab_0    conda-forge
        psutil                    5.9.4           py311hd4cff14_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.14.0             pyhd8ed1ab_0    conda-forge
        pyopenssl                 23.1.1             pyhd8ed1ab_0    conda-forge
        pyrsistent                0.19.3          py311h2582759_0    conda-forge
        pysocks                   1.7.1              pyha2e5f31_6    conda-forge
        python                    3.11.2          h2755cc3_0_cpython    conda-forge
        python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
        python-fastjsonschema     2.16.3             pyhd8ed1ab_0    conda-forge
        python-json-logger        2.0.7              pyhd8ed1ab_0    conda-forge
        python_abi                3.11                    3_cp311    conda-forge
        pytz                      2023.3             pyhd8ed1ab_0    conda-forge
        pyyaml                    6.0             py311hd4cff14_5    conda-forge
        pyzmq                     25.0.2          py311hd6ccaeb_0    conda-forge
        readline                  8.2                  h8228510_1    conda-forge
        requests                  2.28.2             pyhd8ed1ab_1    conda-forge
        rfc3339-validator         0.1.4              pyhd8ed1ab_0    conda-forge
        rfc3986-validator         0.1.1              pyh9f0ad1d_0    conda-forge
        send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
        setuptools                67.6.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.2              pyhd8ed1ab_0    conda-forge
        terminado                 0.17.1             pyh41d4057_0    conda-forge
        tinycss2                  1.2.1              pyhd8ed1ab_0    conda-forge
        tk                        8.6.12               h27826a3_0    conda-forge
        tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
        tornado                   6.2             py311hd4cff14_1    conda-forge
        traitlets                 5.9.0              pyhd8ed1ab_0    conda-forge
        typing-extensions         4.5.0                hd8ed1ab_0    conda-forge
        typing_extensions         4.5.0              pyha770c72_0    conda-forge
        tzdata                    2023c                h71feb2d_0    conda-forge
        urllib3                   1.26.15            pyhd8ed1ab_0    conda-forge
        voila                     0.4.0              pyhd8ed1ab_0    conda-forge
        wcwidth                   0.2.6              pyhd8ed1ab_0    conda-forge
        webencodings              0.5.1                      py_1    conda-forge
        websocket-client          1.5.1              pyhd8ed1ab_0    conda-forge
        websockets                10.4            py311hd4cff14_1    conda-forge
        wheel                     0.40.0             pyhd8ed1ab_0    conda-forge
        widgetsnbextension        4.0.7                    pypi_0    pypi
        xz                        5.2.6                h166bdaf_0    conda-forge
        yaml                      0.2.5                h7f98852_2    conda-forge
        zeromq                    4.3.4                h9c3ff4c_1    conda-forge
        zipp                      3.15.0             pyhd8ed1ab_0    conda-forge

conda env:
        name: ipywidgets-test
        channels:
          - conda-forge
          - file:///mnt/conda-bld
        dependencies:
          - _libgcc_mutex=0.1=conda_forge
          - _openmp_mutex=4.5=2_gnu
          - anyio=3.6.2=pyhd8ed1ab_0
          - argon2-cffi=21.3.0=pyhd8ed1ab_0
          - argon2-cffi-bindings=21.2.0=py311hd4cff14_3
          - asttokens=2.2.1=pyhd8ed1ab_0
          - attrs=22.2.0=pyh71513ae_0
          - babel=2.12.1=pyhd8ed1ab_1
          - backcall=0.2.0=pyh9f0ad1d_0
          - backports=1.0=pyhd8ed1ab_3
          - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
          - beautifulsoup4=4.12.0=pyha770c72_0
          - bleach=6.0.0=pyhd8ed1ab_0
          - brotlipy=0.7.0=py311hd4cff14_1005
          - bzip2=1.0.8=h7f98852_4
          - ca-certificates=2022.12.7=ha878542_0
          - certifi=2022.12.7=pyhd8ed1ab_0
          - cffi=1.15.1=py311h409f033_3
          - charset-normalizer=3.1.0=pyhd8ed1ab_0
          - comm=0.1.3=pyhd8ed1ab_0
          - cryptography=40.0.1=py311h9b4c7bb_0
          - debugpy=1.6.6=py311hcafe171_0
          - 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=6.1.0=pyha770c72_0
          - importlib_metadata=6.1.0=hd8ed1ab_0
          - importlib_resources=5.12.0=pyhd8ed1ab_0
          - ipykernel=6.22.0=pyh210e3f2_0
          - ipython=8.12.0=pyh41d4057_0
          - ipython_genutils=0.2.0=py_1
          - jedi=0.18.2=pyhd8ed1ab_0
          - jinja2=3.1.2=pyhd8ed1ab_1
          - json5=0.9.5=pyh9f0ad1d_0
          - jsonschema=4.17.3=pyhd8ed1ab_0
          - jupyter_client=7.4.1=pyhd8ed1ab_0
          - jupyter_core=5.3.0=py311h38be061_0
          - jupyter_events=0.6.3=pyhd8ed1ab_0
          - jupyter_server=1.23.6=pyhd8ed1ab_0
          - jupyter_server_terminals=0.4.4=pyhd8ed1ab_1
          - jupyterlab=3.5.0=pyhd8ed1ab_0
          - jupyterlab_pygments=0.2.2=pyhd8ed1ab_0
          - jupyterlab_server=2.22.0=pyhd8ed1ab_0
          - ld_impl_linux-64=2.40=h41732ed_0
          - libexpat=2.5.0=hcb278e6_1
          - libffi=3.4.2=h7f98852_5
          - libgcc-ng=12.2.0=h65d4601_19
          - libgomp=12.2.0=h65d4601_19
          - libnsl=2.0.0=h7f98852_0
          - libsodium=1.0.18=h36c2ea0_1
          - libsqlite=3.40.0=h753d276_0
          - libstdcxx-ng=12.2.0=h46fd767_19
          - libuuid=2.38.1=h0b41bf4_0
          - libzlib=1.2.13=h166bdaf_4
          - markupsafe=2.1.2=py311h2582759_0
          - matplotlib-inline=0.1.6=pyhd8ed1ab_0
          - mistune=2.0.5=pyhd8ed1ab_0
          - nbclassic=0.5.3=pyh8b2e9e2_2
          - nbclient=0.7.2=pyhd8ed1ab_0
          - nbconvert=7.2.10=pyhd8ed1ab_1
          - nbconvert-core=7.2.10=pyhd8ed1ab_1
          - nbconvert-pandoc=7.2.10=pyhd8ed1ab_1
          - nbformat=5.8.0=pyhd8ed1ab_0
          - ncurses=6.3=h27087fc_1
          - nest-asyncio=1.5.6=pyhd8ed1ab_0
          - notebook=6.5.3=pyha770c72_0
          - notebook-shim=0.2.2=pyhd8ed1ab_0
          - openssl=3.1.0=h0b41bf4_0
          - packaging=23.0=pyhd8ed1ab_0
          - pandoc=2.19.2=h32600fe_2
          - 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=23.0.1=pyhd8ed1ab_0
          - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_0
          - platformdirs=3.2.0=pyhd8ed1ab_0
          - prometheus_client=0.16.0=pyhd8ed1ab_0
          - prompt-toolkit=3.0.38=pyha770c72_0
          - prompt_toolkit=3.0.38=hd8ed1ab_0
          - psutil=5.9.4=py311hd4cff14_0
          - ptyprocess=0.7.0=pyhd3deb0d_0
          - pure_eval=0.2.2=pyhd8ed1ab_0
          - pycparser=2.21=pyhd8ed1ab_0
          - pygments=2.14.0=pyhd8ed1ab_0
          - pyopenssl=23.1.1=pyhd8ed1ab_0
          - pyrsistent=0.19.3=py311h2582759_0
          - pysocks=1.7.1=pyha2e5f31_6
          - python=3.11.2=h2755cc3_0_cpython
          - python-dateutil=2.8.2=pyhd8ed1ab_0
          - python-fastjsonschema=2.16.3=pyhd8ed1ab_0
          - python-json-logger=2.0.7=pyhd8ed1ab_0
          - python_abi=3.11=3_cp311
          - pytz=2023.3=pyhd8ed1ab_0
          - pyyaml=6.0=py311hd4cff14_5
          - pyzmq=25.0.2=py311hd6ccaeb_0
          - readline=8.2=h8228510_1
          - requests=2.28.2=pyhd8ed1ab_1
          - rfc3339-validator=0.1.4=pyhd8ed1ab_0
          - rfc3986-validator=0.1.1=pyh9f0ad1d_0
          - send2trash=1.8.0=pyhd8ed1ab_0
          - setuptools=67.6.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.2=pyhd8ed1ab_0
          - terminado=0.17.1=pyh41d4057_0
          - tinycss2=1.2.1=pyhd8ed1ab_0
          - tk=8.6.12=h27826a3_0
          - tomli=2.0.1=pyhd8ed1ab_0
          - tornado=6.2=py311hd4cff14_1
          - traitlets=5.9.0=pyhd8ed1ab_0
          - typing-extensions=4.5.0=hd8ed1ab_0
          - typing_extensions=4.5.0=pyha770c72_0
          - tzdata=2023c=h71feb2d_0
          - urllib3=1.26.15=pyhd8ed1ab_0
          - voila=0.4.0=pyhd8ed1ab_0
          - wcwidth=0.2.6=pyhd8ed1ab_0
          - webencodings=0.5.1=py_1
          - websocket-client=1.5.1=pyhd8ed1ab_0
          - websockets=10.4=py311hd4cff14_1
          - wheel=0.40.0=pyhd8ed1ab_0
          - xz=5.2.6=h166bdaf_0
          - yaml=0.2.5=h7f98852_2
          - zeromq=4.3.4=h9c3ff4c_1
          - zipp=3.15.0=pyhd8ed1ab_0
          - pip:
              - ipywidgets==8.0.6
              - jupyterlab-widgets==3.0.7
              - widgetsnbextension==4.0.7
        prefix: /home/jovyan/mambaforge/envs/ipywidgets-test
Command Line Output
# packages in environment at /home/jovyan/mambaforge/envs/ipywidgets-test:
#
# Name                    Version                   Build  Channel
jupyterlab                3.5.0              pyhd8ed1ab_0    conda-forge
jupyterlab-widgets        3.0.7                    pypi_0    pypi
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.22.0             pyhd8ed1ab_0    conda-forge
(ipywidgets-test) jovyan@PORT3010:/mnt/c/engDev/git_mf/voila_issue$ jupyter lab --debug
[D 2023-04-04 12:29:57.932 ServerApp] Searching ['/home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter', '/home/jovyan/.jupyter', '/home/jovyan/.local/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 2023-04-04 12:29:57.932 ServerApp] Looking for jupyter_config in /etc/jupyter
[D 2023-04-04 12:29:57.933 ServerApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 2023-04-04 12:29:57.933 ServerApp] Looking for jupyter_config in /home/jovyan/.local/etc/jupyter
[D 2023-04-04 12:29:57.933 ServerApp] Looking for jupyter_config in /home/jovyan/.jupyter
[D 2023-04-04 12:29:57.933 ServerApp] Looking for jupyter_config in /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter
[D 2023-04-04 12:29:57.933 ServerApp] Looking for jupyter_server_config in /etc/jupyter
[D 2023-04-04 12:29:57.934 ServerApp] Looking for jupyter_server_config in /usr/local/etc/jupyter
[D 2023-04-04 12:29:57.934 ServerApp] Looking for jupyter_server_config in /home/jovyan/.local/etc/jupyter
[D 2023-04-04 12:29:57.934 ServerApp] Looking for jupyter_server_config in /home/jovyan/.jupyter
[D 2023-04-04 12:29:57.934 ServerApp] Looking for jupyter_server_config in /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter
[D 2023-04-04 12:29:57.935 ServerApp] Paths used for configuration of jupyter_server_config:
        /etc/jupyter/jupyter_server_config.json
[D 2023-04-04 12:29:57.935 ServerApp] Paths used for configuration of jupyter_server_config:
        /usr/local/etc/jupyter/jupyter_server_config.json
[D 2023-04-04 12:29:57.935 ServerApp] Paths used for configuration of jupyter_server_config:
        /home/jovyan/.local/etc/jupyter/jupyter_server_config.json
[D 2023-04-04 12:29:57.936 ServerApp] Paths used for configuration of jupyter_server_config:
        /home/jovyan/.jupyter/jupyter_server_config.json
[D 2023-04-04 12:29:57.936 ServerApp] Paths used for configuration of jupyter_server_config:
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.d/jupyter_server_terminals.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.d/jupyterlab.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.d/nbclassic.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.d/notebook_shim.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.d/voila.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_server_config.json
[W 2023-04-04 12:29:57.936 ServerApp] jupyter_server_terminals | error adding extension (enabled: True): Jupyter Server Terminals requires Jupyter Server 2.0+
    Traceback (most recent call last):
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 320, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 166, in __init__
        super().__init__(*args, **kwargs)
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/traitlets/traitlets.py", line 1361, in __init__
        value = self._traits[key]._cross_validate(self, getattr(self, key))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/traitlets/traitlets.py", line 746, in _cross_validate
        value = obj._trait_validators[self.name](obj, proposal)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/traitlets/traitlets.py", line 1233, in __call__
        return self.func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 175, in _validate_name
        self._module, self._metadata = get_metadata(name)
                                       ^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyter_server/extension/utils.py", line 60, in get_metadata
        module = importlib.import_module(package_name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "", line 1206, in _gcd_import
      File "", line 1178, in _find_and_load
      File "", line 1149, in _find_and_load_unlocked
      File "", line 690, in _load_unlocked
      File "", line 940, in exec_module
      File "", line 241, in _call_with_frames_removed
      File "/home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyter_server_terminals/__init__.py", line 9, in 
        raise RuntimeError("Jupyter Server Terminals requires Jupyter Server 2.0+")
    RuntimeError: Jupyter Server Terminals requires Jupyter Server 2.0+
[D 2023-04-04 12:29:58.096 LabApp] Config changed: {'NotebookApp': {}, 'ServerApp': {'log_level': 'DEBUG', 'jpserver_extensions': }, 'ExtensionApp': {'log_level': 'DEBUG'}}
[I 2023-04-04 12:29:58.097 ServerApp] jupyterlab | extension was successfully linked.
[D 2023-04-04 12:29:58.100 NotebookApp] Config changed: {'NotebookApp': {}, 'ServerApp': {'log_level': 'DEBUG', 'jpserver_extensions': }, 'ExtensionApp': {'log_level': 'DEBUG'}}
[I 2023-04-04 12:29:58.100 ServerApp] nbclassic | extension was successfully linked.
[D 2023-04-04 12:29:58.330 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /home/jovyan/.jupyter/jupyter_notebook_config.json
[D 2023-04-04 12:29:58.330 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /etc/jupyter/jupyter_notebook_config.json
[D 2023-04-04 12:29:58.330 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /usr/local/etc/jupyter/jupyter_notebook_config.json
[D 2023-04-04 12:29:58.330 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /home/jovyan/.local/etc/jupyter/jupyter_notebook_config.json
[D 2023-04-04 12:29:58.330 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /home/jovyan/.jupyter/jupyter_notebook_config.json
[D 2023-04-04 12:29:58.331 ServerApp] Paths used for configuration of jupyter_notebook_config:
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_notebook_config.d/jupyterlab.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_notebook_config.d/voila.json
        /home/jovyan/mambaforge/envs/ipywidgets-test/etc/jupyter/jupyter_notebook_config.json
[I 2023-04-04 12:29:58.331 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-04-04 12:29:58.331 ServerApp] voila.server_extension | extension was successfully linked.
[D 2023-04-04 12:29:58.332 ServerApp] Config changed: {'ExtensionApp': {'log_level': 'DEBUG'}, 'NotebookApp': {}, 'ServerApp': {'log_level': 'DEBUG', 'jpserver_extensions': }}
[D 2023-04-04 12:29:58.332 ServerApp] Raising open file limit: soft 1024->4096; hard 4096->4096
[I 2023-04-04 12:29:58.345 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-04-04 12:29:58.345 LabApp] JupyterLab extension loaded from /home/jovyan/mambaforge/envs/ipywidgets-test/lib/python3.11/site-packages/jupyterlab
[I 2023-04-04 12:29:58.345 LabApp] JupyterLab application directory is /home/jovyan/mambaforge/envs/ipywidgets-test/share/jupyter/lab
[I 2023-04-04 12:29:58.347 ServerApp] jupyterlab | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-04-04 12:29:58.349 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-04-04 12:29:58.351 ServerApp] voila.server_extension | extension was successfully loaded.
[I 2023-04-04 12:29:58.352 ServerApp] Serving notebooks from local directory: /mnt/c/engDev/git_mf/voila_issue
[I 2023-04-04 12:29:58.352 ServerApp] Jupyter Server 1.23.6 is running at:
[I 2023-04-04 12:29:58.352 ServerApp] http://localhost:8888/lab?token=6fe8fc9e4a051344ab87fffcf3483b5d01e0c8be626633db
[I 2023-04-04 12:29:58.352 ServerApp]  or http://127.0.0.1:8888/lab?token=6fe8fc9e4a051344ab87fffcf3483b5d01e0c8be626633db
[I 2023-04-04 12:29:58.352 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-04-04 12:29:58.638 ServerApp]

    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-12895-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/lab?token=6fe8fc9e4a051344ab87fffcf3483b5d01e0c8be626633db
     or http://127.0.0.1:8888/lab?token=6fe8fc9e4a051344ab87fffcf3483b5d01e0c8be626633db
Start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ Start "file:///home/jovyan/.local/share/jupyter/runtime/jpserver-1289 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Browser Output
An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can remove its sandboxing.

If using JupyterLab

Installed Labextensions
JupyterLab v3.5.0
/home/jovyan/mambaforge/envs/ipywidgets-test/share/jupyter/labextensions
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        @jupyter-widgets/jupyterlab-manager v5.0.7 enabled OK (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.2.0 enabled OK (python, voila)
maartenbreddels commented 1 year ago

This requires a new release of voila since it bundles the base and control packages. A future version of voila will not do that, and pick the version installed from ipywidgets.

jgunstone commented 1 year ago

just checked and this appears to be working in v0.5.0rc0