question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bokeh dashboard not viewable at all

See original GitHub issue

What happened: Using a docker image for dask, was unable to load the dashboard image

What you expected to happen: To load the bokeh dashboard from the docker container

Minimal Complete Verifiable Example:

version: '3.2'
networks:
  network:

services:
  dask-scheduler:
    container_name: dask_scheduler
    image: daskdev/dask:2021.3.0
    # image: daskdev/dask:2021.2.0 # This is most recent version that works
    hostname: dask-scheduler
    ports:
      - "8786:8786"
      - "8787:8787"
    restart: 'always'
    environment:
      - EXTRA_PIP_PACKAGES=prometheus_client jupyter-server-proxy # not sure if these are breaking something
    command: ['dask-scheduler']
    networks:
    - network

Looks like it comes from here: https://github.com/dask/distributed/blob/main/distributed/scheduler.py#L3338

>>> import distributed.dashboard.scheduler
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.8/site-packages/distributed/dashboard/scheduler.py", line 13, in <module>
    from .components.scheduler import (
ImportError: cannot import name 'individual_systemmonitor_doc' from 'distributed.dashboard.components.scheduler' (/opt/conda/lib/python3.8/site-packages/distributed/dashboard/components/scheduler.py)
>>> 
(base) root@dask-scheduler:/# python
Python 3.8.0 (default, Nov  6 2019, 21:49:08) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import distributed
>>> import distributed.dashboard
>>> import distributed.dashboard.components
>>> import distributed.dashboard.components.scheduler
>>> from distributed.dashboard.components.scheduler import individual_systemmonitor_doc
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'individual_systemmonitor_doc' from 'distributed.dashboard.components.scheduler' (/opt/conda/lib/python3.8/site-packages/distributed/dashboard/components/scheduler.py)

Anything else we need to know?:

Environment:

  • Dask version: 2021.3.0 / 2021.3.1 / 2021.4.0 / 2021.4.1
  • Python version: 3.8.0
  • Operating System: Ubuntu 20.04
  • Install method (conda, pip, source): Docker container from dockerhub – daskdev/dask:2021.3.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jrbourbeaucommented, May 4, 2021

individual_systemmonitor_doc was removed in the distributed=2021.4.1 release. @nickvazz could you confirm whether the version of distributed you’re using in the Python REPL is 2021.3.0 or something else?

1reaction
quasibencommented, May 4, 2021

Hmm, I used your docker-compose setup and was able to load the dashboard at localhost:8787. Here’s the output from docker-compose up

dask_scheduler    | Successfully installed Send2Trash-1.5.0 aiohttp-3.7.4.post0 anyio-2.2.0 argon2-cffi-20.1.0 async-generator-1.10 async-timeout-3.0.1 attrs-20.3.0 bleach-3.3.0 defusedxml-0.7.1 deprecation-2.1.0 entrypoints-0.3 ipython-genutils-0.2.0 jsonschema-3.2.0 jupyter-client-6.1.12 jupyter-core-4.7.1 jupyter-packaging-0.9.2 jupyter-server-1.6.4 jupyter-server-proxy-3.0.2 jupyterlab-pygments-0.1.2 mistune-0.8.4 multidict-5.1.0 nbclient-0.5.3 nbconvert-6.0.7 nbformat-5.1.3 nest-asyncio-1.5.1 pandocfilters-1.4.3 prometheus-client-0.10.1 ptyprocess-0.7.0 pygments-2.9.0 pyrsistent-0.17.3 pyzmq-22.0.3 simpervisor-0.4 sniffio-1.2.0 terminado-0.9.4 testpath-0.4.4 tomlkit-0.7.0 traitlets-5.0.5 webencodings-0.5.1 yarl-1.6.3
dask_scheduler    | + exec dask-scheduler
dask_scheduler    | distributed.scheduler - INFO - -----------------------------------------------
dask_scheduler    | distributed.scheduler - INFO - -----------------------------------------------
dask_scheduler    | distributed.scheduler - INFO - Clear task state
dask_scheduler    | distributed.scheduler - INFO -   Scheduler at:     tcp://173.20.0.2:8786
dask_scheduler    | distributed.scheduler - INFO -   dashboard at:                     :8787

And after exec-ing into the container was able to load the function you tried

❯ docker exec -it 4de99c5b55cb /bin/bash
(base) root@dask-scheduler:/# conda info -e
# conda environments:
#
base                  *  /opt/conda

(base) root@dask-scheduler:/# python
Python 3.8.0 (default, Nov  6 2019, 21:49:08)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dask
>>> dask.__version__
'2021.03.0'
>>> from distributed.dashboard.components.scheduler import individual_systemmonitor_doc
>>> individual_systemmonitor_doc
<function individual_systemmonitor_doc at 0x7f693ab5ac10>
>>>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Bokeh dashboard layout; widget layout does not show
this is known issue with pandas_bokeh. this error came if you have same plots name but it works when you use curdoc/server type...
Read more >
Bokeh dashboard not showing in iphone/ipad (Safari and ...
Dear Community, I have a Bokeh dashboard that works fine in Chrome Desktop, and also on my Android phone with Chrome, but I...
Read more >
Building Dashboards Using Bokeh - CODE Magazine
Using Bokeh, you can create dashboards - a visual display of all your key data. What's more, Bokeh powers your dashboards on Web...
Read more >
bokeh dashboard throws exception when showing all workers
Hmm I'm seeing this er on the main /status page, but not on the workers page. I am seeing errors with loading bokeh.js...
Read more >
Data Visualization with Bokeh in Python, Part III: Making a ...
Example of Bokeh Dashboard built for my research. While not every idea you see on Twitter is probably going to be helpful to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found