holoviz / panel

Panel: The powerful data exploration & web app framework for Python
https://panel.holoviz.org
BSD 3-Clause "New" or "Revised" License
4.66k stars 506 forks source link

Bokeh: BokehJS was loaded multiple times but one version failed to initialize. #7264

Closed tomascsantos closed 1 week ago

tomascsantos commented 1 week ago

Hi team, thanks for your hard work. If possible, can we put a high priority on this fix? It's quite damaging to user experience.

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)

Software Version Info ```plaintext acryl-datahub==0.10.5.5 aiohappyeyeballs==2.4.0 aiohttp==3.10.5 aiosignal==1.3.1 alembic==1.13.2 ansi2html==1.9.2 anyio==4.4.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0 arrow==1.3.0 asttokens==2.4.1 async-generator==1.10 async-lru==2.0.4 attrs==24.2.0 autograd==1.7.0 autograd-gamma==0.5.0 avro==1.10.2 avro-gen3==0.7.10 awscli==1.33.27 babel==2.16.0 backports.tarfile==1.2.0 beautifulsoup4==4.12.3 black==24.8.0 bleach==6.1.0 blinker==1.8.2 bokeh==3.4.2 bokehtools==0.46.2 boto3==1.34.76 botocore==1.34.145 bouncer-client==0.4.1 cached-property==1.5.2 certifi==2024.7.4 certipy==0.1.3 cffi==1.17.0 charset-normalizer==3.3.2 click==8.1.7 click-default-group==1.2.4 click-spinner==0.1.10 cloudpickle==3.0.0 colorama==0.4.6 colorcet==3.0.1 comm==0.2.2 contourpy==1.3.0 cryptography==43.0.0 cycler==0.12.1 dash==2.17.1 dash-core-components==2.0.0 dash-html-components==2.0.0 dash-table==5.0.0 dask==2024.8.1 datashader==0.16.3 datatank-client==2.1.10.post12049 dataworks-common==2.1.10.post12049 debugpy==1.8.5 decorator==5.1.1 defusedxml==0.7.1 Deprecated==1.2.14 directives-client==0.4.4 docker==7.1.0 docutils==0.16 entrypoints==0.4 executing==2.0.1 expandvars==0.12.0 fastjsonschema==2.20.0 Flask==3.0.3 fonttools==4.53.1 formulaic==1.0.2 fqdn==1.5.1 frozenlist==1.4.1 fsspec==2024.6.1 future==1.0.0 gitdb==4.0.11 GitPython==3.1.43 greenlet==3.0.3 h11==0.14.0 holoviews==1.19.0 httpcore==1.0.5 httpx==0.27.2 humanfriendly==10.0 hvplot==0.10.0 idna==3.8 ijson==3.3.0 importlib-metadata==4.13.0 interface-meta==1.3.0 ipykernel==6.29.5 ipython==8.18.0 ipython-genutils==0.2.0 ipywidgets==8.1.5 isoduration==20.11.0 isort==5.13.2 itsdangerous==2.2.0 jaraco.classes==3.4.0 jaraco.context==6.0.1 jaraco.functools==4.0.2 jedi==0.19.1 jeepney==0.8.0 Jinja2==3.1.4 jira==3.2.0 jmespath==1.0.1 json5==0.9.25 jsonpointer==3.0.0 jsonref==1.1.0 jsonschema==4.17.3 jsonschema-specifications==2023.12.1 jupyter==1.0.0 jupyter-console==6.6.3 jupyter-dash==0.4.2 jupyter-events==0.10.0 jupyter-lsp==2.2.5 jupyter-resource-usage==1.1.0 jupyter-server-mathjax==0.2.6 jupyter-telemetry==0.1.0 jupyter_bokeh==4.0.5 jupyter_client==8.6.2 jupyter_core==5.7.2 jupyter_server==2.14.2 jupyter_server_proxy==4.3.0 jupyter_server_terminals==0.5.3 jupyterhub==4.1.4 jupyterlab==4.2.5 jupyterlab-vim==4.1.3 jupyterlab_code_formatter==3.0.2 jupyterlab_git==0.50.1 jupyterlab_pygments==0.3.0 jupyterlab_server==2.27.3 jupyterlab_templates==0.5.2 jupyterlab_widgets==3.0.13 keyring==25.3.0 kiwisolver==1.4.5 lckr_jupyterlab_variableinspector==3.2.1 lifelines==0.29.0 linkify-it-py==2.0.3 llvmlite==0.43.0 locket==1.0.0 Mako==1.3.5 Markdown==3.3.7 markdown-it-py==3.0.0 MarkupSafe==2.1.5 matplotlib==3.9.2 matplotlib-inline==0.1.7 mdit-py-plugins==0.4.1 mdurl==0.1.2 mistune==3.0.2 mixpanel==4.10.1 more-itertools==10.4.0 multidict==6.0.5 multipledispatch==1.0.0 mypy-extensions==1.0.0 nbclassic==1.1.0 nbclient==0.10.0 nbconvert==7.16.4 nbdime==4.0.1 nbformat==5.10.4 nbgitpuller==1.2.1 nest-asyncio==1.6.0 notebook==7.2.2 notebook_shim==0.2.4 numba==0.60.0 numpy==1.26.4 oauthlib==3.2.2 overrides==7.7.0 packaging==24.1 pamela==1.2.0 pandas==2.1.4 pandocfilters==1.5.1 panel==1.4.4 param==2.1.1 parso==0.8.4 partd==1.4.2 pathspec==0.12.1 pexpect==4.9.0 pillow==10.4.0 platformdirs==4.2.2 plotly==5.23.0 progressbar2==4.5.0 prometheus_client==0.20.0 prompt-toolkit==3.0.38 psutil==5.9.8 psycopg2-binary==2.9.9 ptyprocess==0.7.0 pure_eval==0.2.3 pyarrow==15.0.2 pyasn1==0.6.0 pycparser==2.22 pyct==0.5.0 pydantic==1.10.18 Pygments==2.18.0 PyHive==0.7.0 PyJWT==2.9.0 pymssql==2.3.0 PyMySQL==1.1.1 pyodbc==5.1.0 pyOpenSSL==24.2.1 pyparsing==3.1.4 pyrsistent==0.20.0 pyspork==2.24.0 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-utils==3.8.2 pytz==2024.1 pyviz_comms==3.0.3 PyYAML==6.0.1 pyzmq==26.2.0 qtconsole==5.5.2 QtPy==2.4.1 ratelimiter==1.2.0.post0 redis==3.5.3 referencing==0.35.1 requests==2.32.3 requests-file==2.1.0 requests-oauthlib==2.0.0 requests-toolbelt==1.0.0 retrying==1.3.4 rfc3339-validator==0.1.4 rfc3986-validator==0.1.1 rpds-py==0.20.0 rsa==4.7.2 ruamel.yaml==0.17.40 ruamel.yaml.clib==0.2.8 ruff==0.6.2 s3transfer==0.10.2 scipy==1.13.0 SecretStorage==3.3.3 Send2Trash==1.8.3 sentry-sdk==2.13.0 simpervisor==1.0.0 six==1.16.0 smmap==5.0.1 sniffio==1.3.1 soupsieve==2.6 SQLAlchemy==1.4.52 sqlparse==0.4.4 stack-data==0.6.3 structlog==22.1.0 tabulate==0.9.0 tenacity==9.0.0 termcolor==2.4.0 terminado==0.18.1 tesladex-client==0.9.0 tinycss2==1.3.0 toml==0.10.2 toolz==0.12.1 tornado==6.4.1 tqdm==4.66.4 traitlets==5.14.3 types-python-dateutil==2.9.0.20240821 typing-inspect==0.9.0 typing_extensions==4.5.0 tzdata==2024.1 tzlocal==5.2 uc-micro-py==1.0.3 uri-template==1.3.0 urllib3==1.26.19 wcwidth==0.2.13 webcolors==24.8.0 webencodings==0.5.1 websocket-client==1.8.0 Werkzeug==3.0.4 widgetsnbextension==4.0.13 wrapt==1.16.0 xarray==2024.7.0 xyzservices==2024.6.0 yapf==0.32.0 yarl==1.9.4 zipp==3.20.1 ```

Description of expected behavior and the observed behavior

I should be able to use panel in 2 notebooks simultaneously, but if I save my changes and reload the page, the error will show.

Complete, minimal, self-contained example code that reproduces the issue

Steps to reproduce:

  1. create 2 notebooks with the following content
    # notebook 1
    import panel as pn
    pn.extension()
    pn.Column('hi')
# notebook 2 (open in another jupyterlab tab)
import panel as pn
pn.extension()
pn.Column('hi')
  1. Run both notebooks
  2. Save both notebooks
  3. Reload your page
  4. Try to run either of the notebooks and you'll see the error.

Stack traceback and/or browser JavaScript console output

(Ignore 'set_log_level` error. I think it's unrelated.) image

philippjfr commented 1 week ago

Really, really, appreciate this reproducer. Looking now.

philippjfr commented 1 week ago

Found the culprit, I owe you huge amounts of gratitude for finding such a simple reproducer.

techanfa commented 1 week ago

Thanks for the quick fix! Do you have any timeline for release?

philippjfr commented 1 week ago

Was hoping for tonight, but it's gotten late in Europe and releasing last thing on a Friday is generally a poor idea 😄 So first thing Monday.