I am getting this error stack trace for this piece of code
... # some class defining the function
def get_name_to_color(self):
"""return a dictionary mapping column names to color names"""
return hv.Cycle("Category10").values
...
self.map_features = self.map_features.opts(
marker=dim(marker_by).categorize(
self.dataui_manager.get_name_to_marker(), default="circle"
)
)
The error that appears only in 1.20.1 is
File "xxxx\Lib\site-packages\bokeh\core\property\bases.py", line 363, in prepare_value
raise ValueError(f"failed to validate {obj_repr}.{name}: {error}")
ValueError: failed to validate Scatter(id='p1141', ...).fill_color: expected an element of either String, Nullable(Color), Instance(Value), Instance(Field), Instance(Expr), Struct(value=Nullable(Color), transform=Instance(Transform)), Struct(field=String, transform=Instance(Transform)) or Struct(expr=Instance(Expression), transform=Instance(Transform)), got dim('Sensor').categorize(categories=['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'], default='blue')
This doesn’t happend if i downgrade to 1.20.0 holoviews release. I tried reproducing it but was not successful. Not sure if I should open a github issue or not?
I am not sure why the holoviews opts is treating this as a string and passing it verbatim to the bokeh backend.