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.

datashader on bokeh server

See original GitHub issue

I’m trying to using holoviews, bokeh server, and datashader based somewhat on the example in issue #959. I’m getting the following error and I’m not sure how to debug it:

ERROR:bokeh.server.protocol.server_handler:error handling message Message ‘PATCH-DOC’ (revision 1): AttributeError(“‘NoneType’ object has no attribute ‘_session_callbacks’”,)

The plot shows up and looks correct but the datashading aspect on zoom does not seem to be working and throws that error.

My bokeh application code is —

import numpy as np
import holoviews as hv
from holoviews.operation.datashader import datashade
import holoviews.plotting.bokeh # noqa (Activate backend)
from bokeh.layouts import row
from bokeh.plotting import curdoc

doc = curdoc()

renderer = hv.Store.renderers['bokeh'].instance(mode='server', holomap='server')
options = hv.Store.options(backend='bokeh')

y = np.random.standard_normal(size = 2000000)
x = np.arange(len(y)) / 200000.0

curve = hv.Curve((x, y))
datashaded = datashade(curve, cmap=["blue"])

plot = renderer.get_plot(datashaded)

layout = row(plot.state)

doc.add_root(layout)

conda env —

dependencies:
- !!python/unicode
  'colorcet=0.9.1=py35_0'
- !!python/unicode
  'datashader=0.5.0=py35_0'
- !!python/unicode
  'bleach=1.5.0=py35_0'
- !!python/unicode
  'bokeh=0.12.5=py35_1'
- !!python/unicode
  'bzip2=1.0.6=vc14_3'
- !!python/unicode
  'cloudpickle=0.2.2=py35_0'
- !!python/unicode
  'colorama=0.3.9=py35_0'
- !!python/unicode
  'cycler=0.10.0=py35_0'
- !!python/unicode
  'dask=0.14.3=py35_1'
- !!python/unicode
  'datashape=0.5.4=py35_0'
- !!python/unicode
  'decorator=4.0.11=py35_0'
- !!python/unicode
  'entrypoints=0.2.2=py35_1'
- !!python/unicode
  'freetype=2.5.5=vc14_2'
- !!python/unicode
  'h5py=2.6.0=np111py35_2'
- !!python/unicode
  'hdf5=1.8.15.1=vc14_4'
- !!python/unicode
  'holoviews=1.7.0=py35_0'
- !!python/unicode
  'html5lib=0.999=py35_0'
- !!python/unicode
  'icu=57.1=vc14_0'
- !!python/unicode
  'ipykernel=4.6.1=py35_0'
- !!python/unicode
  'ipython=6.1.0=py35_0'
- !!python/unicode
  'ipython_genutils=0.2.0=py35_0'
- !!python/unicode
  'ipywidgets=6.0.0=py35_0'
- !!python/unicode
  'jedi=0.10.2=py35_2'
- !!python/unicode
  'jinja2=2.9.4=py35_0'
- !!python/unicode
  'jpeg=9b=vc14_0'
- !!python/unicode
  'jsonschema=2.6.0=py35_0'
- !!python/unicode
  'jupyter=1.0.0=py35_3'
- !!python/unicode
  'jupyter_client=5.0.1=py35_0'
- !!python/unicode
  'jupyter_console=5.1.0=py35_0'
- !!python/unicode
  'jupyter_core=4.3.0=py35_0'
- !!python/unicode
  'libpng=1.6.27=vc14_0'
- !!python/unicode
  'libtiff=4.0.6=vc14_3'
- !!python/unicode
  'llvmlite=0.18.0=py35_0'
- !!python/unicode
  'locket=0.2.0=py35_1'
- !!python/unicode
  'markupsafe=0.23=py35_2'
- !!python/unicode
  'matplotlib=2.0.2=np111py35_0'
- !!python/unicode
  'mistune=0.7.4=py35_0'
- !!python/unicode
  'mkl=11.3.3=1'
- !!python/unicode
  'multipledispatch=0.4.9=py35_0'
- !!python/unicode
  'nbconvert=5.2.1=py35_0'
- !!python/unicode
  'nbformat=4.3.0=py35_0'
- !!python/unicode
  'networkx=1.11=py35_0'
- !!python/unicode
  'notebook=5.0.0=py35_0'
- !!python/unicode
  'numba=0.33.0=np111py35_0'
- !!python/unicode
  'numpy=1.11.2=py35_0'
- !!python/unicode
  'odo=0.5.0=py35_1'
- !!python/unicode
  'olefile=0.44=py35_0'
- !!python/unicode
  'openssl=1.0.2l=vc14_0'
- !!python/unicode
  'pandas=0.20.1=np111py35_0'
- !!python/unicode
  'pandocfilters=1.4.1=py35_0'
- !!python/unicode
  'partd=0.3.8=py35_0'
- !!python/unicode
  'path.py=10.3.1=py35_0'
- !!python/unicode
  'pickleshare=0.7.4=py35_0'
- !!python/unicode
  'pillow=4.1.1=py35_0'
- !!python/unicode
  'pip=9.0.1=py35_1'
- !!python/unicode
  'prompt_toolkit=1.0.14=py35_0'
- !!python/unicode
  'pygments=2.2.0=py35_0'
- !!python/unicode
  'pyparsing=2.1.4=py35_0'
- !!python/unicode
  'pyqt=5.6.0=py35_2'
- !!python/unicode
  'python=3.5.2=0'
- !!python/unicode
  'python-dateutil=2.6.0=py35_0'
- !!python/unicode
  'pytz=2017.2=py35_0'
- !!python/unicode
  'pyyaml=3.12=py35_0'
- !!python/unicode
  'pyzmq=16.0.2=py35_0'
- !!python/unicode
  'qt=5.6.2=vc14_4'
- !!python/unicode
  'qtconsole=4.3.0=py35_0'
- !!python/unicode
  'requests=2.12.4=py35_0'
- !!python/unicode
  'scipy=0.18.1=np111py35_0'
- !!python/unicode
  'setuptools=27.2.0=py35_1'
- !!python/unicode
  'simplegeneric=0.8.1=py35_1'
- !!python/unicode
  'sip=4.18=py35_0'
- !!python/unicode
  'six=1.10.0=py35_0'
- !!python/unicode
  'sqlalchemy=1.1.6=py35_0'
- !!python/unicode
  'testpath=0.3.1=py35_0'
- !!python/unicode
  'tk=8.5.18=vc14_0'
- !!python/unicode
  'toolz=0.8.2=py35_0'
- !!python/unicode
  'tornado=4.4.2=py35_0'
- !!python/unicode
  'traitlets=4.3.2=py35_0'
- !!python/unicode
  'vs2015_runtime=14.0.25123=0'
- !!python/unicode
  'wcwidth=0.1.7=py35_0'
- !!python/unicode
  'wheel=0.29.0=py35_0'
- !!python/unicode
  'widgetsnbextension=2.0.0=py35_0'
- !!python/unicode
  'win_unicode_console=0.5=py35_0'
- !!python/unicode
  'xarray=0.9.6=py35_0'
- !!python/unicode
  'zlib=1.2.8=vc14_3'
- !!python/unicode
  'param=1.5.1=py35_0'
- pip:
  - aiofiles==0.3.0
  - aiohttp==1.2.0
  - aiohttp-cors==0.5.0
  - aiohttp-jinja2==0.13.0
  - aiopg==0.13.0
  - alembic==0.9.0
  - async-timeout==1.1.0
  - asyncpg==0.9.0
  - asyncpgsa==0.8.2
  - bkcharts==0.1
  - certifi==2017.4.17
  - chardet==3.0.3
  - freezegun==0.3.8
  - idna==2.5
  - ipython-genutils==0.2.0
  - jupyter-client==5.0.1
  - jupyter-console==5.1.0
  - jupyter-core==4.3.0
  - mako==1.0.6
  - multidict==2.1.4
  - prompt-toolkit==1.0.14
  - psycopg2==2.6.2
  - py==1.4.32
  - pyserial==3.2.1
  - pyserial-asyncio==0.3
  - pytest==3.0.6
  - pytest-aiohttp==0.1.3
  - python-editor==1.0.3
  - rx==1.5.8
  - urllib3==1.21.1
  - win-unicode-console==0.5
  - yarl==0.8.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, Jun 14, 2017

That said the simpler thing to do all around is this:

import numpy as np
import holoviews as hv
from holoviews.operation.datashader import datashade
import holoviews.plotting.bokeh # noqa (Activate backend)

y = np.random.standard_normal(size = 2000000)
x = np.arange(len(y)) / 200000.0

curve = hv.Curve((x, y))
datashaded = datashade(curve, cmap=["blue"])

doc = hv.renderer('bokeh').server_doc(datashaded)
0reactions
philippjfrcommented, Oct 27, 2017

Closing this as it seems to have been addressed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exploring other tools — Bokeh 2.4.3 Documentation
Datashader is a separate Python library that renders even the largest datasets as fixed-size raster images that faithfully represent the underlying data.
Read more >
Interactivity — Datashader v0.14.3
To get axes and interactivity, the images generated by Datashader need to be embedded into a plot using an external library like Matplotlib...
Read more >
Bokeh-TimeSeries-Datashader example need
Here I need to make an app in order to create datashader with zoom updates. Ok,bokeh server is the easy part. Inside bokeh...
Read more >
OSM, but your way | GeoViews, datashader, Bokeh Server
October 17, 2021 9 min to read. OSM, but your way | GeoViews, datashader, Bokeh Server. Data: OpenStreetMap | Tools: osmnx, GeoViews, ...
Read more >
Working with large data using datashader — HoloViews v1.15.3
import datashader as ds import numpy as np import holoviews as hv import pandas as pd import ... which require a running a...
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