justinbois / bebi103

Utilities for BE/Bi 103
BSD 3-Clause "New" or "Revised" License
15 stars 15 forks source link

Datashader import error. #26

Open mrazomej opened 4 years ago

mrazomej commented 4 years ago

Every time I import the module I always get the following warning:

bebi103-0.0.55-py3.7.egg/bebi103/viz.py:37: UserWarning: DataShader import failed with error 
"cannot import name 'encode_utf8' from 'bokeh.embed.notebook' 
(/Users/mrazomej/anaconda3/lib/python3.7/site-packages/bokeh/embed/notebook.py)".
Features requiring DataShader will not work and you will get exceptions.

The error seems to be in import datashader.bokeh_ext.

When I use corner plots with datashade=True I get the following error:

~/anaconda3/lib/python3.7/site-packages/bebi103-0.0.55-py3.7.egg/bebi103/viz.py in corner(samples, pars, labels, datashade, plot_width, plot_ecdf, cmap, color_by_chain, palette, divergence_color, alpha, single_param_color, bins, show_contours, contour_color, bins_2d, levels, weights, smooth, extend_contour_domain, plot_width_correction, plot_height_correction, xtick_label_orientation)

NameError: name 'datashader' is not defined

Any ideas on why this is happening?

Computational environment:

CPython 3.7.7
IPython 7.13.0

bebi103 0.0.55
bokeh 2.0.1
datashader 0.10.0

compiler   : Clang 4.0.1 (tags/RELEASE_401/final)
system     : Darwin
release    : 18.7.0
machine    : x86_64
processor  : i386
CPU cores  : 8
interpreter: 64bit
mrazomej commented 4 years ago

It seems to be an incompatibility issue with bokeh 2.0. Allegedly this has been already fixed as shown in 888. The datashade option will then hopefully work with the next version of datashader.

justinbois commented 4 years ago

I think what needs to happen is to update how DataShader is used. This issue should stay open until that is done, since the update to DataShader will also involve a deprecation.