jupyter-widgets / ipywidgets

Interactive Widgets for the Jupyter Notebook
https://ipywidgets.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.13k stars 948 forks source link

Unable to display button. Get "Error displaying widget" #3598

Open gogasca opened 2 years ago

gogasca commented 2 years ago

Description

Unable to display button. Get "Error displaying widget" error

image

Reproduce

Create a new User Managed Notebook (Google Cloud)

import ipywidgets as widgets

test_button = widgets.Button(value='Press me', description="Press me") 
display(test_button)

Shows Error displaying widget

In JupyterLab logs:

Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
134.bcbea9feb6e7c4da…ea9feb6e7c4da7530:1 TypeError: n.createErrorWidgetModel is not a function
    at manager-base.js:96:34
    at async w.renderModel (134.bcbea9feb6e7c4da…6e7c4da7530:1:72264)
renderModel @   134.bcbea9feb6e7c4da…ea9feb6e7c4da7530:1
await in renderModel (async)        
createRenderedMimetype  @   widget.js:505
createOutputItem    @   widget.js:477
_createOutput   @   widget.js:443
_insertOutput   @   widget.js:430
onModelChanged  @   widget.js:225
m   @   index.es6.js:459
l   @   index.es6.js:416
e.emit  @   index.es6.js:99
_onListChanged  @   model.js:231
m   @   index.es6.js:459
l   @   index.es6.js:416
e.emit  @   index.es6.js:99
push    @   observablelist.js:139
_add    @   model.js:207
add @   model.js:128
_onIOPub    @   widget.js:92
_handleIOPub    @   future.js:230
await in _handleIOPub (async)       
handleMsg   @   future.js:199
_handleMessage  @   default.js:1168
(anonymous) @   default.js:110
Promise.then (async)        
_onWSMessage    @   default.js:107

Expected behavior

Display button

Context

Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
jupyter troubleshoot
$PATH:
        /usr/local/cuda/bin
        /opt/conda/bin
        /opt/conda/condabin
        /usr/local/bin
        /usr/bin
        /bin
        /usr/local/games
        /usr/games

sys.path:
        /opt/conda/bin
        /opt/conda/lib/python37.zip
        /opt/conda/lib/python3.7
        /opt/conda/lib/python3.7/lib-dynload
        /opt/conda/lib/python3.7/site-packages

sys.executable:
        /opt/conda/bin/python

sys.version:
        3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 06:08:53) 
        [GCC 9.4.0]

platform.platform():
        Linux-4.19.0-21-cloud-amd64-x86_64-with-debian-10.13

which -a jupyter:
        /opt/conda/bin/jupyter

pip list:
        Package                               Version
        ------------------------------------- -----------
        absl-py                               1.2.0
        aiohttp                               3.8.1
        aiosignal                             1.2.0
        ansiwrap                              0.8.4
        anyio                                 3.6.1
        apache-beam                           2.41.0
        appdirs                               1.4.4
        argon2-cffi                           21.3.0
        argon2-cffi-bindings                  21.2.0
        asn1crypto                            1.5.1
        astunparse                            1.6.3
        async-timeout                         4.0.2
        asynctest                             0.13.0
        attrs                                 22.1.0
        Babel                                 2.10.3
        backcall                              0.2.0
        backports.functools-lru-cache         1.6.4
        beatrix-jupyterlab                    3.1.7
        beautifulsoup4                        4.11.1
        black                                 22.8.0
        bleach                                5.0.1
        blinker                               1.4
        Bottleneck                            1.3.5
        brotlipy                              0.7.0
        cachetools                            5.2.0
        certifi                               2022.9.14
        cffi                                  1.15.1
        charset-normalizer                    2.1.1
        click                                 8.1.3
        cloud-tpu-client                      0.10
        cloudpickle                           2.2.0
        colorama                              0.4.5
        conda                                 4.14.0
        conda-content-trust                   0+unknown
        conda-package-handling                1.8.1
        confuse                               2.0.0
        crcmod                                1.7
        cryptography                          37.0.4
        cycler                                0.11.0
        debugpy                               1.6.3
        decorator                             5.1.1
        defusedxml                            0.7.1
        dill                                  0.3.5.1
        dm-tree                               0.1.7
        docker                                5.0.3
        docker-pycreds                        0.4.0
        docopt                                0.6.2
        entrypoints                           0.4
        explainable-ai-sdk                    1.3.3
        explainers                            0.1
        fastavro                              1.6.1
        fasteners                             0.18
        fastjsonschema                        2.16.1
        flatbuffers                           1.12
        flit_core                             3.7.1
        fonttools                             4.37.2
        frozenlist                            1.3.1
        fsspec                                2022.8.2
        future                                0.18.2
        gast                                  0.4.0
        gcsfs                                 2022.8.2
        gitdb                                 4.0.9
        GitPython                             3.1.27
        google-api-core                       2.8.1
        google-api-python-client              2.61.0
        google-apitools                       0.5.31
        google-auth                           2.11.0
        google-auth-httplib2                  0.1.0
        google-auth-oauthlib                  0.4.6
        google-cloud-aiplatform               1.17.1
        google-cloud-appengine-logging        1.1.4
        google-cloud-audit-log                0.2.4
        google-cloud-bigquery                 2.34.4
        google-cloud-bigquery-storage         2.15.0
        google-cloud-bigtable                 2.11.3
        google-cloud-core                     2.3.2
        google-cloud-dataproc                 5.0.1
        google-cloud-datastore                2.8.1
        google-cloud-dlp                      3.9.0
        google-cloud-firestore                2.6.1
        google-cloud-kms                      2.12.1
        google-cloud-language                 2.5.2
        google-cloud-logging                  3.2.2
        google-cloud-monitoring               2.11.1
        google-cloud-pubsub                   2.13.6
        google-cloud-pubsublite               1.4.3
        google-cloud-recommendations-ai       0.7.1
        google-cloud-resource-manager         1.6.1
        google-cloud-scheduler                2.7.1
        google-cloud-spanner                  3.20.0
        google-cloud-speech                   2.15.1
        google-cloud-storage                  2.5.0
        google-cloud-tasks                    2.10.2
        google-cloud-translate                3.8.2
        google-cloud-videointelligence        2.8.1
        google-cloud-vision                   3.1.2
        google-crc32c                         1.1.2
        google-pasta                          0.2.0
        google-resumable-media                2.3.3
        googleapis-common-protos              1.56.4
        greenlet                              1.1.3
        grpc-google-iam-v1                    0.12.4
        grpcio                                1.48.1
        grpcio-gcp                            0.2.2
        grpcio-status                         1.48.1
        h5py                                  3.7.0
        hdfs                                  2.7.0
        horovod                               0.23.0
        htmlmin                               0.1.12
        httplib2                              0.20.4
        idna                                  3.3
        ImageHash                             4.3.0
        imageio                               2.21.3
        importlib-metadata                    4.11.4
        importlib-resources                   5.9.0
        ipykernel                             6.15.3
        ipython                               7.33.0
        ipython-genutils                      0.2.0
        ipython-sql                           0.3.9
        ipywidgets                            8.0.2
        jaraco.classes                        3.2.2
        jedi                                  0.18.1
        jeepney                               0.8.0
        Jinja2                                2.11.3
        joblib                                1.2.0
        json5                                 0.9.5
        jsonschema                            4.16.0
        jupyter                               1.0.0
        jupyter_client                        7.3.5
        jupyter-console                       6.4.4
        jupyter_core                          4.11.1
        jupyter-http-over-ws                  0.0.8
        jupyter-server                        1.18.1
        jupyter-server-mathjax                0.2.6
        jupyter-server-proxy                  3.2.2
        jupyterlab                            3.2.9
        jupyterlab-git                        0.39.2
        jupyterlab-pygments                   0.2.2
        jupyterlab-server                     2.10.3
        jupyterlab-widgets                    3.0.3
        jupytext                              1.14.0
        keras                                 2.9.0
        Keras-Preprocessing                   1.1.2
        keras-tuner                           1.1.3
        keyring                               23.9.3
        keyrings.google-artifactregistry-auth 1.1.1
        kiwisolver                            1.4.4
        kt-legacy                             1.0.4
        libclang                              14.0.6
        llvmlite                              0.38.1
        lxml                                  4.9.1
        Markdown                              3.4.1
        markdown-it-py                        2.1.0
        MarkupSafe                            2.1.1
        matplotlib                            3.5.3
        matplotlib-inline                     0.1.6
        mdit-py-plugins                       0.3.0
        mdurl                                 0.1.0
        missingno                             0.4.2
        mistune                               0.8.4
        more-itertools                        8.14.0
        multidict                             6.0.2
        multimethod                           1.4
        munkres                               1.1.4
        mypy-extensions                       0.4.3
        nb-conda                              2.2.1
        nb-conda-kernels                      2.3.1
        nbclassic                             0.4.3
        nbclient                              0.5.13
        nbconvert                             6.4.5
        nbdime                                3.1.1
        nbformat                              5.5.0
        nest-asyncio                          1.5.5
        networkx                              2.7.1
        notebook                              6.4.12
        notebook-executor                     0.2
        notebook-shim                         0.1.0
        numba                                 0.55.2
        numpy                                 1.21.6
        oauth2client                          4.1.3
        oauthlib                              3.2.1
        opt-einsum                            3.3.0
        orjson                                3.8.0
        overrides                             6.2.0
        packaging                             21.3
        pandas                                1.3.5
        pandas-profiling                      3.0.0
        pandocfilters                         1.5.0
        papermill                             2.3.4
        parso                                 0.8.3
        pathspec                              0.10.1
        patsy                                 0.5.2
        pexpect                               4.8.0
        phik                                  0.12.2
        pickleshare                           0.7.5
        Pillow                                9.2.0
        pip                                   22.2.2
        pkgutil_resolve_name                  1.3.10
        platformdirs                          2.5.2
        pluggy                                1.0.0
        ply                                   3.11
        prettytable                           3.4.1
        prometheus-client                     0.14.1
        promise                               2.3
        prompt-toolkit                        3.0.31
        proto-plus                            1.22.1
        protobuf                              3.19.5
        psutil                                5.9.2
        ptyprocess                            0.7.0
        pyarrow                               9.0.0
        pyasn1                                0.4.8
        pyasn1-modules                        0.2.7
        pycosat                               0.6.3
        pycparser                             2.21
        pydantic                              1.10.2
        pydot                                 1.4.2
        Pygments                              2.13.0
        PyJWT                                 2.5.0
        pymongo                               3.12.3
        pyOpenSSL                             22.0.0
        pyparsing                             3.0.9
        PyQt5                                 5.15.7
        PyQt5-sip                             12.11.0
        pyrsistent                            0.18.1
        PySocks                               1.7.1
        python-dateutil                       2.8.2
        pytz                                  2022.2.1
        pyu2f                                 0.1.5
        PyWavelets                            1.3.0
        PyYAML                                6.0
        pyzmq                                 24.0.0
        qtconsole                             5.3.2
        QtPy                                  2.2.0
        requests                              2.28.1
        requests-oauthlib                     1.3.1
        retrying                              1.3.3
        rsa                                   4.9
        ruamel-yaml-conda                     0.15.100
        scikit-image                          0.19.3
        scikit-learn                          1.0.2
        scipy                                 1.7.3
        seaborn                               0.12.0
        SecretStorage                         3.3.3
        Send2Trash                            1.8.0
        setuptools                            59.8.0
        simpervisor                           0.4
        sip                                   6.6.2
        six                                   1.16.0
        smmap                                 3.0.5
        sniffio                               1.3.0
        soupsieve                             2.3.2.post1
        SQLAlchemy                            1.4.41
        sqlparse                              0.4.2
        statsmodels                           0.13.2
        tangled-up-in-unicode                 0.2.0
        tenacity                              8.0.1
        tensorboard                           2.9.1
        tensorboard-data-server               0.6.1
        tensorboard-plugin-wit                1.8.1
        tensorflow                            2.9.2
        tensorflow-cloud                      0.1.16
        tensorflow-datasets                   4.4.0
        tensorflow-estimator                  2.9.0
        tensorflow-hub                        0.12.0
        tensorflow-io                         0.23.1
        tensorflow-io-gcs-filesystem          0.27.0
        tensorflow-metadata                   1.10.0
        tensorflow-probability                0.14.1
        tensorflow-serving-api                2.10.0
        tensorflow-transform                  1.10.1
        termcolor                             2.0.1
        terminado                             0.15.0
        testpath                              0.6.0
        textwrap3                             0.9.2
        tfx-bsl                               1.10.1
        threadpoolctl                         3.1.0
        tifffile                              2021.11.2
        tinycss2                              1.1.1
        toml                                  0.10.2
        tomli                                 2.0.1
        toolz                                 0.12.0
        tornado                               6.2
        tqdm                                  4.64.1
        traitlets                             5.4.0
        typed-ast                             1.5.4
        typing_extensions                     4.3.0
        unicodedata2                          14.0.0
        uritemplate                           4.1.1
        urllib3                               1.26.11
        visions                               0.7.1
        wcwidth                               0.2.5
        webencodings                          0.5.1
        websocket-client                      1.4.1
        Werkzeug                              2.2.2
        wheel                                 0.37.1
        widgetsnbextension                    4.0.3
        witwidget                             1.8.0
        wrapt                                 1.14.1
        yarl                                  1.7.2
        zipp                                  3.8.1

conda list:
        # packages in environment at /opt/conda:
        #
        # Name                    Version                   Build  Channel
        _libgcc_mutex             0.1                 conda_forge    conda-forge
        _openmp_mutex             4.5                       2_gnu    conda-forge
        absl-py                   1.2.0              pyhd8ed1ab_0    conda-forge
        aiohttp                   3.8.1            py37h540881e_1    conda-forge
        aiosignal                 1.2.0              pyhd8ed1ab_0    conda-forge
        alsa-lib                  1.2.7.2              h166bdaf_0    conda-forge
        ansiwrap                  0.8.4                      py_0    conda-forge
        anyio                     3.6.1              pyhd8ed1ab_1    conda-forge
        apache-beam               2.41.0                   pypi_0    pypi
        appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
        argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
        argon2-cffi-bindings      21.2.0           py37h540881e_2    conda-forge
        asn1crypto                1.5.1              pyhd8ed1ab_0    conda-forge
        astunparse                1.6.3                    pypi_0    pypi
        async-timeout             4.0.2              pyhd8ed1ab_0    conda-forge
        asynctest                 0.13.0                     py_0    conda-forge
        attr                      2.5.1                h166bdaf_1    conda-forge
        attrs                     22.1.0             pyh71513ae_1    conda-forge
        babel                     2.10.3             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
        beatrix-jupyterlab        3.1.7                    pypi_0    pypi
        beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
        black                     22.8.0           py37h89c1867_0    conda-forge
        bleach                    5.0.1              pyhd8ed1ab_0    conda-forge
        blinker                   1.4                        py_1    conda-forge
        bottleneck                1.3.5            py37hda87dfa_0    conda-forge
        brotli                    1.0.9                h166bdaf_7    conda-forge
        brotli-bin                1.0.9                h166bdaf_7    conda-forge
        brotlipy                  0.7.0           py37h27cfd23_1003  
        c-ares                    1.18.1               h7f98852_0    conda-forge
        ca-certificates           2022.9.14            ha878542_0    conda-forge
        cachetools                5.2.0              pyhd8ed1ab_0    conda-forge
        certifi                   2022.9.14          pyhd8ed1ab_0    conda-forge
        cffi                      1.15.1           py37h43b0acd_0    conda-forge
        charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
        click                     8.1.3            py37h89c1867_0    conda-forge
        cloud-tpu-client          0.10                     pypi_0    pypi
        cloudpickle               2.2.0                    pypi_0    pypi
        colorama                  0.4.5              pyhd8ed1ab_0    conda-forge
        conda                     4.14.0           py37h89c1867_0    conda-forge
        conda-content-trust       0.1.1              pyhd3eb1b0_0  
        conda-package-handling    1.8.1            py37h7f8727e_0  
        confuse                   2.0.0              pyhd8ed1ab_0    conda-forge
        crcmod                    1.7                      pypi_0    pypi
        cryptography              37.0.4           py37h38fbfac_0    conda-forge
        cudatoolkit               11.2.2              hbe64b41_10    conda-forge
        cudnn                     8.1.0.77             h90431f1_0    conda-forge
        cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
        dbus                      1.13.6               h5008d03_3    conda-forge
        debugpy                   1.6.3            py37hd23a5d3_0    conda-forge
        decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
        defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
        dill                      0.3.5.1                  pypi_0    pypi
        dlenv-base                1.0.20220917     py37hadde398_0    file:///tmp/conda-pkgs
        dlenv-tf-2-9-gpu          1.0.20220917     py37hddb555a_0    
        dm-tree                   0.1.7                    pypi_0    pypi
        docker-py                 5.0.3            py37h89c1867_2    conda-forge
        docker-pycreds            0.4.0                      py_0    conda-forge
        docopt                    0.6.2                    pypi_0    pypi
        entrypoints               0.4                pyhd8ed1ab_0    conda-forge
        expat                     2.4.8                h27087fc_0    conda-forge
        explainable-ai-sdk        1.3.3                    pypi_0    pypi
        explainers                0.1                      pypi_0    pypi
        fastavro                  1.6.1                    pypi_0    pypi
        fasteners                 0.18                     pypi_0    pypi
        fftw                      3.3.10          nompi_hf0379b8_105    conda-forge
        flatbuffers               1.12                     pypi_0    pypi
        flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
        font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
        font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
        font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
        font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
        fontconfig                2.14.0               hc2a2eb6_1    conda-forge
        fonts-conda-ecosystem     1                             0    conda-forge
        fonts-conda-forge         1                             0    conda-forge
        fonttools                 4.37.2           py37h540881e_0    conda-forge
        freetype                  2.12.1               hca18f0e_0    conda-forge
        frozenlist                1.3.1            py37h540881e_0    conda-forge
        fsspec                    2022.8.2           pyhd8ed1ab_0    conda-forge
        future                    0.18.2                   pypi_0    pypi
        gast                      0.4.0                    pypi_0    pypi
        gcsfs                     2022.8.2           pyhd8ed1ab_0    conda-forge
        gettext                   0.19.8.1          h73d1719_1008    conda-forge
        gitdb                     4.0.9              pyhd8ed1ab_0    conda-forge
        gitpython                 3.1.27             pyhd8ed1ab_0    conda-forge
        glib                      2.72.1               h6239696_0    conda-forge
        glib-tools                2.72.1               h6239696_0    conda-forge
        google-api-core           1.33.1                   pypi_0    pypi
        google-api-core-grpcio-gcp 2.8.1                hd8ed1ab_0    conda-forge
        google-api-python-client  1.8.0                    pypi_0    pypi
        google-apitools           0.5.31                   pypi_0    pypi
        google-auth               2.11.0             pyh6c4a22f_0    conda-forge
        google-auth-httplib2      0.1.0              pyhd8ed1ab_1    conda-forge
        google-auth-oauthlib      0.4.6                    pypi_0    pypi
        google-cloud-aiplatform   1.17.1                   pypi_0    pypi
        google-cloud-appengine-logging 1.1.4                    pypi_0    pypi
        google-cloud-audit-log    0.2.4                    pypi_0    pypi
        google-cloud-bigquery     2.34.4                   pypi_0    pypi
        google-cloud-bigquery-storage 2.13.2                   pypi_0    pypi
        google-cloud-bigtable     1.7.2                    pypi_0    pypi
        google-cloud-core         2.3.2              pyhd8ed1ab_0    conda-forge
        google-cloud-dataproc     5.0.1                    pypi_0    pypi
        google-cloud-datastore    2.8.1                    pypi_0    pypi
        google-cloud-dlp          3.9.0                    pypi_0    pypi
        google-cloud-firestore    2.6.1                    pypi_0    pypi
        google-cloud-kms          2.12.1                   pypi_0    pypi
        google-cloud-language     1.3.2                    pypi_0    pypi
        google-cloud-logging      3.2.2                    pypi_0    pypi
        google-cloud-monitoring   2.11.1                   pypi_0    pypi
        google-cloud-pubsub       2.13.6                   pypi_0    pypi
        google-cloud-pubsublite   1.4.3                    pypi_0    pypi
        google-cloud-recommendations-ai 0.7.1                    pypi_0    pypi
        google-cloud-resource-manager 1.6.1                    pypi_0    pypi
        google-cloud-scheduler    2.7.1                    pypi_0    pypi
        google-cloud-spanner      1.19.3                   pypi_0    pypi
        google-cloud-speech       2.15.1                   pypi_0    pypi
        google-cloud-storage      2.5.0              pyh6c4a22f_0    conda-forge
        google-cloud-tasks        2.10.2                   pypi_0    pypi
        google-cloud-translate    3.8.2                    pypi_0    pypi
        google-cloud-videointelligence 2.8.1                    pypi_0    pypi
        google-cloud-vision       3.1.2                    pypi_0    pypi
        google-crc32c             1.1.2            py37h5d4fa31_3    conda-forge
        google-pasta              0.2.0                    pypi_0    pypi
        google-resumable-media    2.3.3              pyhd8ed1ab_0    conda-forge
        googleapis-common-protos  1.56.4           py37h89c1867_0    conda-forge
        greenlet                  1.1.3            py37hd23a5d3_0    conda-forge
        grpc-cpp                  1.48.1               hbad87ad_1    conda-forge
        grpc-google-iam-v1        0.12.4                   pypi_0    pypi
        grpcio                    1.48.1           py37h2a57836_1    conda-forge
        grpcio-gcp                0.2.2            py37h89c1867_5    conda-forge
        grpcio-status             1.48.1                   pypi_0    pypi
        gst-plugins-base          1.20.3               h57caac4_1    conda-forge
        gstreamer                 1.20.3               hd4edc92_1    conda-forge
        h5py                      3.7.0                    pypi_0    pypi
        hdfs                      2.7.0                    pypi_0    pypi
        horovod                   0.23.0                   pypi_0    pypi
        htmlmin                   0.1.12                     py_1    conda-forge
        httplib2                  0.20.4             pyhd8ed1ab_0    conda-forge
        icu                       70.1                 h27087fc_0    conda-forge
        idna                      3.3                pyhd3eb1b0_0  
        imagehash                 4.3.0              pyhd8ed1ab_0    conda-forge
        imageio                   2.21.3                   pypi_0    pypi
        importlib-metadata        4.11.4           py37h89c1867_0    conda-forge
        importlib_metadata        4.11.4               hd8ed1ab_0    conda-forge
        importlib_resources       5.9.0              pyhd8ed1ab_0    conda-forge
        ipykernel                 6.15.3             pyh210e3f2_0    conda-forge
        ipython                   7.33.0           py37h89c1867_0    conda-forge
        ipython-sql               0.3.9           pyhd8ed1ab_1004    conda-forge
        ipython_genutils          0.2.0                      py_1    conda-forge
        ipywidgets                8.0.2              pyhd8ed1ab_1    conda-forge
        jack                      1.9.18            h8c3723f_1003    conda-forge
        jaraco-classes            3.2.2                    pypi_0    pypi
        jedi                      0.18.1             pyhd8ed1ab_2    conda-forge
        jeepney                   0.8.0                    pypi_0    pypi
        jinja2                    2.11.3             pyhd8ed1ab_2    conda-forge
        joblib                    1.2.0              pyhd8ed1ab_0    conda-forge
        jpeg                      9e                   h166bdaf_2    conda-forge
        json5                     0.9.5              pyh9f0ad1d_0    conda-forge
        jsonschema                4.16.0             pyhd8ed1ab_0    conda-forge
        jupyter                   1.0.0                    pypi_0    pypi
        jupyter-console           6.4.4                    pypi_0    pypi
        jupyter-http-over-ws      0.0.8                    pypi_0    pypi
        jupyter-server-mathjax    0.2.6              pyhc268e32_0    conda-forge
        jupyter-server-proxy      3.2.2              pyhd8ed1ab_0    conda-forge
        jupyter_client            7.3.5              pyhd8ed1ab_0    conda-forge
        jupyter_core              4.11.1           py37h89c1867_0    conda-forge
        jupyter_server            1.18.1             pyhd8ed1ab_0    conda-forge
        jupyterlab                3.2.9              pyhd8ed1ab_0    conda-forge
        jupyterlab-git            0.39.2             pyhd8ed1ab_0    conda-forge
        jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
        jupyterlab_server         2.10.3             pyhd8ed1ab_0    conda-forge
        jupyterlab_widgets        3.0.3              pyhd8ed1ab_0    conda-forge
        jupytext                  1.14.0             pyheef035f_0    conda-forge
        keras                     2.9.0                    pypi_0    pypi
        keras-preprocessing       1.1.2                    pypi_0    pypi
        keras-tuner               1.1.3                    pypi_0    pypi
        keyring                   23.9.3                   pypi_0    pypi
        keyrings-google-artifactregistry-auth 1.1.1                    pypi_0    pypi
        keyutils                  1.6.1                h166bdaf_0    conda-forge
        kiwisolver                1.4.4            py37h7cecad7_0    conda-forge
        krb5                      1.19.3               h3790be6_0    conda-forge
        kt-legacy                 1.0.4                    pypi_0    pypi
        lcms2                     2.12                 hddcbb42_0    conda-forge
        ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
        lerc                      4.0.0                h27087fc_0    conda-forge
        libabseil                 20220623.0      cxx17_h48a1fff_4    conda-forge
        libblas                   3.9.0           16_linux64_openblas    conda-forge
        libbrotlicommon           1.0.9                h166bdaf_7    conda-forge
        libbrotlidec              1.0.9                h166bdaf_7    conda-forge
        libbrotlienc              1.0.9                h166bdaf_7    conda-forge
        libcap                    2.65                 ha37c62d_0    conda-forge
        libcblas                  3.9.0           16_linux64_openblas    conda-forge
        libclang                  14.0.6                   pypi_0    pypi
        libclang13                14.0.6          default_h3a83d3e_0    conda-forge
        libcrc32c                 1.1.2                h9c3ff4c_0    conda-forge
        libcups                   2.3.3                h3e49a29_2    conda-forge
        libdb                     6.2.32               h9c3ff4c_0    conda-forge
        libdeflate                1.14                 h166bdaf_0    conda-forge
        libedit                   3.1.20191231         he28a2e2_2    conda-forge
        libevent                  2.1.10               h9b69904_4    conda-forge
        libffi                    3.4.2                h7f98852_5    conda-forge
        libflac                   1.3.4                h27087fc_0    conda-forge
        libgcc-ng                 12.1.0              h8d9b700_16    conda-forge
        libgfortran-ng            12.1.0              h69a702a_16    conda-forge
        libgfortran5              12.1.0              hdcd56e2_16    conda-forge
        libglib                   2.72.1               h2d90d5f_0    conda-forge
        libgomp                   12.1.0              h8d9b700_16    conda-forge
        libiconv                  1.16                 h516909a_0    conda-forge
        liblapack                 3.9.0           16_linux64_openblas    conda-forge
        libllvm11                 11.1.0               hf817b99_3    conda-forge
        libllvm14                 14.0.6               he0ac6c6_0    conda-forge
        libnsl                    2.0.0                h7f98852_0    conda-forge
        libogg                    1.3.4                h7f98852_1    conda-forge
        libopenblas               0.3.21          pthreads_h78a6416_3    conda-forge
        libopus                   1.3.1                h7f98852_1    conda-forge
        libpng                    1.6.38               h753d276_0    conda-forge
        libpq                     14.5                 hd77ab85_0    conda-forge
        libprotobuf               3.20.1               h6239696_4    conda-forge
        libsndfile                1.0.31               h9c3ff4c_1    conda-forge
        libsodium                 1.0.18               h36c2ea0_1    conda-forge
        libsqlite                 3.39.3               h753d276_0    conda-forge
        libstdcxx-ng              12.1.0              ha89aaad_16    conda-forge
        libtiff                   4.4.0                h55922b4_4    conda-forge
        libtool                   2.4.6             h9c3ff4c_1008    conda-forge
        libudev1                  249                  h166bdaf_4    conda-forge
        libuuid                   2.32.1            h7f98852_1000    conda-forge
        libuv                     1.44.2               h166bdaf_0    conda-forge
        libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
        libwebp-base              1.2.4                h166bdaf_0    conda-forge
        libxcb                    1.13              h7f98852_1004    conda-forge
        libxkbcommon              1.0.3                he3ba5ed_0    conda-forge
        libxml2                   2.9.14               h22db469_4    conda-forge
        libxslt                   1.1.35               h8affb1d_0    conda-forge
        libzlib                   1.2.12               h166bdaf_1    conda-forge
        llvmlite                  0.38.1           py37h0761922_0    conda-forge
        lxml                      4.9.1            py37h540881e_0    conda-forge
        markdown                  3.4.1                    pypi_0    pypi
        markdown-it-py            2.1.0              pyhd8ed1ab_0    conda-forge
        markupsafe                2.1.1                    pypi_0    pypi
        matplotlib                3.5.3            py37h89c1867_2    conda-forge
        matplotlib-base           3.5.3            py37hf395dca_2    conda-forge
        matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
        mdit-py-plugins           0.3.0              pyhd8ed1ab_0    conda-forge
        mdurl                     0.1.0              pyhd8ed1ab_0    conda-forge
        missingno                 0.4.2                      py_1    conda-forge
        mistune                   0.8.4           py37h5e8e339_1005    conda-forge
        more-itertools            8.14.0                   pypi_0    pypi
        multidict                 6.0.2            py37h540881e_1    conda-forge
        multimethod               1.4                        py_0    conda-forge
        munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
        mypy_extensions           0.4.3            py37h89c1867_5    conda-forge
        mysql-common              8.0.30               haf5c9bc_1    conda-forge
        mysql-libs                8.0.30               h28c427c_1    conda-forge
        nb_conda                  2.2.1                    unix_6    conda-forge
        nb_conda_kernels          2.3.1            py37h89c1867_1    conda-forge
        nbclassic                 0.4.3              pyhd8ed1ab_0    conda-forge
        nbclient                  0.5.13             pyhd8ed1ab_0    conda-forge
        nbconvert                 6.4.5              pyhd8ed1ab_2    conda-forge
        nbconvert-core            6.4.5              pyhd8ed1ab_2    conda-forge
        nbconvert-pandoc          6.4.5              pyhd8ed1ab_2    conda-forge
        nbdime                    3.1.1              pyhd8ed1ab_0    conda-forge
        nbformat                  5.5.0              pyhd8ed1ab_0    conda-forge
        ncurses                   6.3                  h7f8727e_2  
        nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
        networkx                  2.7.1              pyhd8ed1ab_0    conda-forge
        nodejs                    18.9.0               h96d913c_0    conda-forge
        notebook                  6.4.12             pyha770c72_0    conda-forge
        notebook-executor         0.2                      pypi_0    pypi
        notebook-shim             0.1.0              pyhd8ed1ab_0    conda-forge
        nspr                      4.32                 h9c3ff4c_1    conda-forge
        nss                       3.78                 h2350873_0    conda-forge
        numba                     0.55.2           py37h43839f2_0    conda-forge
        numpy                     1.21.6           py37h976b520_0    conda-forge
        oauth2client              4.1.3                    pypi_0    pypi
        oauthlib                  3.2.1              pyhd8ed1ab_0    conda-forge
        openjpeg                  2.5.0                h7d73246_1    conda-forge
        openssl                   1.1.1q               h166bdaf_0    conda-forge
        opt-einsum                3.3.0                    pypi_0    pypi
        orjson                    3.8.0                    pypi_0    pypi
        overrides                 6.2.0                    pypi_0    pypi
        packaging                 21.3               pyhd8ed1ab_0    conda-forge
        pandas                    1.3.5            py37he8f5f7f_0    conda-forge
        pandas-profiling          3.0.0              pyhd8ed1ab_0    conda-forge
        pandoc                    2.19.2               ha770c72_0    conda-forge
        pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
        papermill                 2.3.4              pyhd8ed1ab_0    conda-forge
        parso                     0.8.3              pyhd8ed1ab_0    conda-forge
        pathspec                  0.10.1             pyhd8ed1ab_0    conda-forge
        patsy                     0.5.2              pyhd8ed1ab_0    conda-forge
        pcre                      8.45                 h9c3ff4c_0    conda-forge
        pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
        phik                      0.12.2           py37h237e563_0    conda-forge
        pickleshare               0.7.5                   py_1003    conda-forge
        pillow                    9.2.0            py37h850a105_2    conda-forge
        pip                       22.2.2             pyhd8ed1ab_0    conda-forge
        pkgutil-resolve-name      1.3.10             pyhd8ed1ab_0    conda-forge
        platformdirs              2.5.2              pyhd8ed1ab_1    conda-forge
        ply                       3.11                       py_1    conda-forge
        portaudio                 19.6.0               h8e90077_6    conda-forge
        prettytable               3.4.1              pyhd8ed1ab_0    conda-forge
        prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
        promise                   2.3                      pypi_0    pypi
        prompt-toolkit            3.0.31             pyha770c72_0    conda-forge
        proto-plus                1.22.1                   pypi_0    pypi
        protobuf                  3.19.5                   pypi_0    pypi
        psutil                    5.9.2            py37h540881e_0    conda-forge
        pthread-stubs             0.4               h36c2ea0_1001    conda-forge
        ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
        pulseaudio                14.0                 h0868958_9    conda-forge
        pyarrow                   6.0.1                    pypi_0    pypi
        pyasn1                    0.4.8                      py_0    conda-forge
        pyasn1-modules            0.2.7                      py_0    conda-forge
        pybind11-abi              4                    hd8ed1ab_3    conda-forge
        pycosat                   0.6.3            py37h27cfd23_0  
        pycparser                 2.21               pyhd3eb1b0_0  
        pydantic                  1.10.2           py37h540881e_0    conda-forge
        pydot                     1.4.2                    pypi_0    pypi
        pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
        pyjwt                     2.5.0              pyhd8ed1ab_0    conda-forge
        pymongo                   3.12.3                   pypi_0    pypi
        pyopenssl                 22.0.0             pyhd3eb1b0_0  
        pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
        pyqt                      5.15.7           py37hf30b843_0    conda-forge
        pyqt5-sip                 12.11.0          py37hd23a5d3_0    conda-forge
        pyrsistent                0.18.1           py37h540881e_1    conda-forge
        pysocks                   1.7.1                    py37_1  
        python                    3.7.12          hb7a2778_100_cpython    conda-forge
        python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
        python-fastjsonschema     2.16.1             pyhd8ed1ab_0    conda-forge
        python_abi                3.7                     2_cp37m    conda-forge
        pytz                      2022.2.1           pyhd8ed1ab_0    conda-forge
        pyu2f                     0.1.5              pyhd8ed1ab_0    conda-forge
        pywavelets                1.3.0            py37hda87dfa_1    conda-forge
        pyyaml                    6.0              py37h540881e_4    conda-forge
        pyzmq                     24.0.0           py37h0c0c2a8_0    conda-forge
        qt-main                   5.15.6               hc525480_0    conda-forge
        qtconsole                 5.3.2                    pypi_0    pypi
        re2                       2022.06.01           h27087fc_0    conda-forge
        readline                  8.1.2                h7f8727e_1  
        requests                  2.28.1             pyhd8ed1ab_1    conda-forge
        requests-oauthlib         1.3.1              pyhd8ed1ab_0    conda-forge
        retrying                  1.3.3                    pypi_0    pypi
        rsa                       4.9                pyhd8ed1ab_0    conda-forge
        ruamel_yaml               0.15.100         py37h27cfd23_0  
        scikit-image              0.19.3                   pypi_0    pypi
        scikit-learn              1.0.2            py37hf9e9bfc_0    conda-forge
        scipy                     1.7.3            py37hf2a6cf1_0    conda-forge
        seaborn                   0.12.0               hd8ed1ab_0    conda-forge
        seaborn-base              0.12.0             pyhd8ed1ab_0    conda-forge
        secretstorage             3.3.3                    pypi_0    pypi
        send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
        setuptools                59.8.0           py37h89c1867_1    conda-forge
        simpervisor               0.4                pyhd8ed1ab_0    conda-forge
        sip                       6.6.2            py37hd23a5d3_0    conda-forge
        six                       1.16.0             pyhd3eb1b0_1  
        smmap                     3.0.5              pyh44b312d_0    conda-forge
        sniffio                   1.3.0              pyhd8ed1ab_0    conda-forge
        soupsieve                 2.3.2.post1        pyhd8ed1ab_0    conda-forge
        sqlalchemy                1.4.41           py37h540881e_0    conda-forge
        sqlite                    3.39.3               h4ff8645_0    conda-forge
        sqlparse                  0.4.2              pyhd8ed1ab_0    conda-forge
        statsmodels               0.13.2           py37hda87dfa_0    conda-forge
        tangled-up-in-unicode     0.2.0              pyhd8ed1ab_0    conda-forge
        tenacity                  8.0.1              pyhd8ed1ab_0    conda-forge
        tensorboard               2.9.1                    pypi_0    pypi
        tensorboard-data-server   0.6.1                    pypi_0    pypi
        tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
        tensorflow                2.9.2                    pypi_0    pypi
        tensorflow-cloud          0.1.16                   pypi_0    pypi
        tensorflow-datasets       4.4.0                    pypi_0    pypi
        tensorflow-estimator      2.9.0                    pypi_0    pypi
        tensorflow-hub            0.12.0                   pypi_0    pypi
        tensorflow-io             0.23.1                   pypi_0    pypi
        tensorflow-io-gcs-filesystem 0.27.0                   pypi_0    pypi
        tensorflow-metadata       1.10.0                   pypi_0    pypi
        tensorflow-probability    0.14.1                   pypi_0    pypi
        tensorflow-serving-api    2.10.0                   pypi_0    pypi
        tensorflow-transform      1.10.1                   pypi_0    pypi
        termcolor                 2.0.1                    pypi_0    pypi
        terminado                 0.15.0           py37h89c1867_0    conda-forge
        testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
        textwrap3                 0.9.2                      py_0    conda-forge
        tfx-bsl                   1.10.1                   pypi_0    pypi
        threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
        tifffile                  2021.11.2                pypi_0    pypi
        tinycss2                  1.1.1              pyhd8ed1ab_0    conda-forge
        tk                        8.6.12               h27826a3_0    conda-forge
        toml                      0.10.2             pyhd8ed1ab_0    conda-forge
        tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
        toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
        tornado                   6.2              py37h540881e_0    conda-forge
        tqdm                      4.64.1             pyhd8ed1ab_0    conda-forge
        traitlets                 5.4.0              pyhd8ed1ab_0    conda-forge
        typed-ast                 1.5.4            py37h540881e_0    conda-forge
        typing-extensions         4.3.0                hd8ed1ab_0    conda-forge
        typing_extensions         4.3.0              pyha770c72_0    conda-forge
        unicodedata2              14.0.0           py37h540881e_1    conda-forge
        uritemplate               3.0.1                    pypi_0    pypi
        urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
        visions                   0.7.1              pyhd8ed1ab_0    conda-forge
        wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
        webencodings              0.5.1                      py_1    conda-forge
        websocket-client          1.4.1              pyhd8ed1ab_0    conda-forge
        werkzeug                  2.2.2                    pypi_0    pypi
        wheel                     0.37.1             pyhd3eb1b0_0  
        widgetsnbextension        4.0.3              pyhd8ed1ab_0    conda-forge
        witwidget                 1.8.0                    pypi_0    pypi
        wrapt                     1.14.1                   pypi_0    pypi
        xcb-util                  0.4.0                h166bdaf_0    conda-forge
        xcb-util-image            0.4.0                h166bdaf_0    conda-forge
        xcb-util-keysyms          0.4.0                h166bdaf_0    conda-forge
        xcb-util-renderutil       0.3.9                h166bdaf_0    conda-forge
        xcb-util-wm               0.4.1                h166bdaf_0    conda-forge
        xorg-libxau               1.0.9                h7f98852_0    conda-forge
        xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
        xz                        5.2.6                h166bdaf_0    conda-forge
        yaml                      0.2.5                h7b6447c_0  
        yarl                      1.7.2            py37h540881e_2    conda-forge
        zeromq                    4.3.4                h9c3ff4c_1    conda-forge
        zipp                      3.8.1              pyhd8ed1ab_0    conda-forge
        zlib                      1.2.12               h7f8727e_1  
        zstd                      1.5.2                h6239696_4    conda-forge

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
Paste the output from your browser Javascript console here.

If using JupyterLab

Installed Labextensions
Paste the output from your command line running `jupyter labextension list`.
```
base) jupyter@tensorflow-2-9-m96:~$ pip freeze | grep ipywidgets
ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1662482321563/work
(base) jupyter@tensorflow-2-9-m96:~$ jupyter labextension list
JupyterLab v3.2.9
/opt/conda/share/jupyter/labextensions
        jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        @jupyter-widgets/jupyterlab-manager v5.0.3 enabled OK (python, jupyterlab_widgets)
        @jupyterlab/git v0.39.2 enabled OK (python, jupyterlab-git)
        @jupyterlab/server-proxy v3.2.2 enabled OK

Other labextensions (built into JupyterLab)
   app dir: /opt/conda/share/jupyter/lab
        beatrix_jupyterlab v3.1.7 disabled OK
        jupyterlab-plotly v5.10.0 enabled OK
        plotlywidget v4.14.3 enabled OK
        tensorflow_model_analysis v0.34.1 enabled OK
        wit-widget v1.8.1 enabled OK

Disabled extensions:
    beatrix_jupyterlab (all plugins)
```
jasongrout commented 2 years ago

DId you upgrade to ipywidgets 8.0, or is this a fresh install? If it was an upgrade, did you restart jupyter lab to pick up the new files?

If you didn't restart jupyter lab, please restart jupyter lab.

If you upgraded and restarted the server, my guess is that the javascript files did not get updated for some reason. In that case, can you try this?

  1. Uninstall jupyterlab-widgets: pip uninstall jupyterlab-widgets
  2. Check to make sure the /opt/conda/share/jupyter/labextensions/@jupyter-widgets/jupyterlab-manager is gone:
    ls /opt/conda/share/jupyter/labextensions/@jupyter-widgets/jupyterlab-manager
  3. Install jupyterlab-widgets again: pip install jupyterlab-widgets
gogasca commented 2 years ago

It is a fresh install. We build the OS and add libraries via conda. Unfortunately was not able to display the button after reinstall. Not sure what other information I can provide to see what may be happening?

YuxuanChen commented 1 year ago

+1 on this issue. Are there any updates?

YuxuanChen commented 1 year ago

We noticed that the version of jupyter-widgets/jupyterlab-manager has changed between the new environment and the old one. Does ipywidgets have a constraint on which version we need installed in the environment?

YuxuanChen commented 1 year ago

Also, re: this table: https://github.com/jupyter-widgets/ipywidgets#version-compatibility-with-front-end-clients, does ipywidgets not guarantee compatibility with JupyterLab at all?

jasongrout commented 1 year ago

Also, re: this table: https://github.com/jupyter-widgets/ipywidgets#version-compatibility-with-front-end-clients, does ipywidgets not guarantee compatibility with JupyterLab at all?

Thanks for pointing that table out. It is outdated and needs to be refreshed. ipywidgets 7 and 8 both support JupyterLab 3.

jasongrout commented 1 year ago

We noticed that the version of jupyter-widgets/jupyterlab-manager has changed between the new environment and the old one. Does ipywidgets have a constraint on which version we need installed in the environment?

ipywidgets 8 requires jupyterlab_widgets python package version 3.x, which shows up in the jlab extension list as @jupyter-widgets/jupyterlab_manager extension version 5.x

YuxuanChen commented 1 year ago

@jasongrout thanks for the reply.

Here is some output from my environment:

(base) jupyter@yxc-widget-m97-3:~$ conda list | grep ipywidgets
ipywidgets                8.0.2              pyhd8ed1ab_1    conda-forge
(base) jupyter@yxc-widget-m97-3:~$ pip list | grep jupyterlab-widgets
jupyterlab-widgets                    3.0.3
(base) jupyter@yxc-widget-m97-3:~$ jupyter labextension list
JupyterLab v3.4.7
/opt/conda/share/jupyter/labextensions
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
        @jupyterlab/server-proxy v3.2.2 enabled OK
        @jupyterlab/git v0.39.2 enabled OK (python, jupyterlab-git)
        @jupyter-widgets/jupyterlab-manager v5.0.3 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /opt/conda/share/jupyter/lab
        beatrix_jupyterlab v2022.927.150007 disabled OK
        jupyterlab-plotly v5.10.0 enabled OK
        plotlywidget v4.14.3 enabled OK
        wit-widget v1.8.1 enabled OK

Disabled extensions:
    beatrix_jupyterlab (all plugins)

I believe that everything is set up properly, with the correct versions. However, I am still getting an issue with widgets failing to display. Is there anything else I can diagnose?

jmk89 commented 1 year ago

In regards to the OP, I created a conda environment with the versions of jupyterlab and ipywidgets from your example but was unable to recreate the particular issue of Error displaying widget.

Screenshot from 2022-11-22 22-27-46

It seems likely to me the root issue isn't from ipywidgets. Is there any useful output to the browser console? If you try uninstalling the extensions one-by-one, perhaps the problematic extension can be singled out.

hetaochen commented 1 year ago

@gogasca @YuxuanChen Have you solved your problem?

amit-chandak-unskript commented 1 year ago

@YuxuanChen we are seeing the same issue https://discourse.jupyter.org/t/ipywidgets-on-jupyterlab-with-enterprise-gateway-gets-stuck-at-loading-widgets/19159, was wondering if you were able to resolve this issue.

mhnasser commented 1 month ago

i solved this problem by opening the anaconda prompt and running:

conda install -c conda-forge ipywidgets

SteveTung-tw commented 1 month ago

@mhnasser Thank you a lot. Problem solved