Harm
April 21, 2022, 7:40pm
1
Hi, I’m using holoviews as an extension to Bokeh to make sankey plot and run into an error coming from Bokeh min.js, which I managed to tail down to an error being thrown from a BitSet class defined in bitset.ts in the Bokeh packagage. There my debugging ends from the Bokeh side as I do not see how to bridge the gap from that object to the holoviews sankey object. In holoviews I tried debugging the sankeys object, but I so far cannot find any strange things happening.
Have you seen this issue before? Do you have pointers for further investigation?
opened 10:26AM - 05 Apr 22 UTC
#### ALL software version info
python : 3.9.7.final.0
python-bits … : 64
OS : Windows
OS-release : 10
Version : 10.0.19043
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 12, GenuineIntel
byteorder : little
holoviews: '1.14.8'
bokeh: '2.4.2'
#### Description of expected behavior and the observed behavior
I expect the code below to run and update the sankey plot when clicking the button. This was working in an earlier version of holoviews.
#### Complete, minimal, self-contained example code that reproduces the issue
```
import pandas as pd
from bokeh.models import Button
from bokeh.plotting import curdoc
import holoviews as hv
hv.extension('bokeh')
data = pd.DataFrame({'Source': ['A', 'A', 'A', 'B'],
'Target': [' A', ' B', 'Other', ' B'],
'Number': [10, 10, 5, 5]})
def plot_sankey(data):
"""Callback for dynamic holoviews sankey plot"""
sankey = hv.Sankey(data)
return sankey
def update_sankey(_):
stream.send(data[data["Source"] != data["Target"].str[1:]])
stream = hv.streams.Pipe(data=data)
dmap = hv.DynamicMap(plot_sankey, streams=[stream])
sankey_plot = hv.render(dmap)
btn = Button(label='+1', name="button")
btn.on_click(update_sankey)
curdoc().add_root(sankey_plot)
curdoc().add_root(btn)
```
#### Stack traceback and/or browser JavaScript console output
Error in browser:
![image](https://user-images.githubusercontent.com/7702207/161733757-8d6b3f72-8e2e-4732-b784-2cbb041b3676.png)
#### Screenshots or screencasts of the bug in action
After start server:
![image](https://user-images.githubusercontent.com/7702207/161733469-f2a98739-2730-4ec0-a6a2-da276a18584f.png)
Click +1 button. After:
![image](https://user-images.githubusercontent.com/7702207/161733631-d00c7b31-62b7-4444-b47e-47c6b13ca119.png)
Now hover over the sankey and the sankey just disappears
_____
Expected output:
![image](https://user-images.githubusercontent.com/7702207/161736239-d6c2eb12-f555-4e9b-ab0a-141bbd684849.png)