When I update bokeh,it take an error
type: bug
- Chartify version(s):3.03
- Operating System(s):win10
- Python version(s):python3.9
What happened:When I update bokeh to the latest version,it take an error
What you expected to happen: ValueError: failed to validate FigureOptions(...).active_drag: expected an element of either Auto, String or Instance(Drag), got None
How to reproduce it (as minimally and precisely as possible): just run
Anything else we need to know?: the previous version bokeh don't put error
I can confirm that chartify doesn't work with bokeh 2.3.0. We should pin it to <2.3.0 until it's been fixed.
Upgrade guide https://docs.bokeh.org/en/latest/docs/releases.html#migration-guide
I too am getting this error:
Traceback (most recent call last):
File "/Users/user/Sites/property-reports/chart.py", line 29, in <module>
ch = chartify.Chart(blank_labels=True, x_axis_type='datetime')
File "/usr/local/lib/python3.9/site-packages/chartify/_core/chart.py", line 116, in __init__
self.figure = self._initialize_figure(self._x_axis_type,
File "/usr/local/lib/python3.9/site-packages/chartify/_core/chart.py", line 168, in _initialize_figure
figure = bokeh.plotting.figure(
File "/usr/local/lib/python3.9/site-packages/bokeh/plotting/figure.py", line 1568, in figure
return Figure(**kwargs)
File "/usr/local/lib/python3.9/site-packages/bokeh/plotting/figure.py", line 159, in __init__
opts = FigureOptions(kw)
File "/usr/local/lib/python3.9/site-packages/bokeh/util/options.py", line 73, in __init__
super().__init__(**props)
File "/usr/local/lib/python3.9/site-packages/bokeh/core/has_props.py", line 269, in __init__
setattr(self, name, value)
File "/usr/local/lib/python3.9/site-packages/bokeh/core/has_props.py", line 298, in __setattr__
super().__setattr__(name, value)
File "/usr/local/lib/python3.9/site-packages/bokeh/core/property/descriptors.py", line 552, in __set__
self._internal_set(obj, value, setter=setter)
File "/usr/local/lib/python3.9/site-packages/bokeh/core/property/descriptors.py", line 784, in _internal_set
value = self.property.prepare_value(obj, self.name, value)
File "/usr/local/lib/python3.9/site-packages/bokeh/core/property/bases.py", line 350, in prepare_value
raise ValueError(f"failed to validate {obj_repr}.{name}: {error}")
ValueError: failed to validate FigureOptions(...).active_drag: expected an element of either Auto, String or Instance(Drag), got None
When I do a pip3 install, it says:
Requirement already satisfied: bokeh<3.0.0,>=2.0.0 in /usr/local/lib/python3.9/site-packages (from chartify) (2.3.1)
I've had to do pip3 install bokeh==2.2.3 to get further forward.
With bokeh == 2.4.0.dev1 the failure is no longer present :) . I think it is because of https://github.com/bokeh/bokeh/commit/edf9bbb22594696dae28a802e9da17715f6153cf, which adds option Null to active_drag (and many more parameters)
/Users/username/Library/Python/3.8/lib/python/site-packages/bokeh/plotting/figure.py kw.update({ 'active_drag': 'auto' }) not accept None