You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System: Red Hat Enterprise Linux 8.5 (Ootpa)
CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos
Kernel: Linux 4.18.0-348.20.1.el8_5.x86_64
Architecture: x86-64
Description of expected behavior and the observed behavior
This error shows up when all conditions below are met:
An interactive dataframe filtered on pn.widgets.CheckBoxGroup.
Multiple plots using the dataframes hvplot plotting methods with the hover_cols argument.
Multiple plots passed to hv.linked_selection.interaction().
Checking a checkbox when all checkboxes are unchecked.
The expected behavior would be for the markers associated with the newly checked checkbox to appear in the plots.
The observed behavior is a KeyError from python and blank plots in the browser.
Note that if hover_cols isn't specified, or only one plot is passed to hv.linked_selection.interaction() this error doesn't occur. There's something about specifying hover_cols and having more than one plot in an interactive layout.
Complete, minimal, self-contained example code that reproduces the issue
I've tested this in a notebook and using the panel serve test.py command on the below code.
2024-02-07 17:01:08,766 ERROR: panel.reactive - Callback failed for object named "Checkboxes" changing property {'value': ['A']}
Traceback (most recent call last):
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/reactive.py", line 385, in _process_events
self.param.update(**self_events)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2278, in update
restore = self_._update(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2318, in _update
self_._batch_call_watchers()
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2509, in _batch_call_watchers
self_._execute_watcher(watcher, events)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2471, in _execute_watcher
watcher.fn(*args, **kwargs)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/streams.py", line 777, in _watcher
self.trigger([self])
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/streams.py", line 189, in trigger
subscriber(**dict(union))
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 243, in refresh
raise e
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 239, in refresh
self._trigger_refresh(stream_key)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 257, in _trigger_refresh
self.update(key)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 956, in update
item = self.__getitem__(key)
^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 443, in __getitem__
self.update_frame(frame)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/bokeh/element.py", line 2014, in update_frame
ranges = self.compute_ranges(self.hmap, key, ranges)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 614, in compute_ranges
self._compute_group_range(group, elements, ranges, framewise,
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 862, in _compute_group_range
filtered = [r for i, r in zip(ids, values[g]) if i not in prev_ids]
~~~~~~^^^
KeyError: 'factors'
2024-02-07 17:01:08,769 Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f3bf384ce50>>, <Task finished name='Task-8695' coro=<ServerSession.with_document_locked() done, defined at /home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/bokeh/server/session.py:77> exception=KeyError('factors')>)
Traceback (most recent call last):
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/tornado/ioloop.py", line 738, in _run_callback
ret = callback()
^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/tornado/ioloop.py", line 762, in _discard_future_result
future.result()
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/bokeh/server/session.py", line 98, in _needs_document_lock_wrapper
result = await result
^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/reactive.py", line 431, in _change_coroutine
state._handle_exception(e)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/io/state.py", line 442, in _handle_exception
raise exception
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/reactive.py", line 429, in _change_coroutine
self._change_event(doc)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/reactive.py", line 447, in _change_event
self._process_events(events)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/panel/reactive.py", line 385, in _process_events
self.param.update(**self_events)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2278, in update
restore = self_._update(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2318, in _update
self_._batch_call_watchers()
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2509, in _batch_call_watchers
self_._execute_watcher(watcher, events)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/param/parameterized.py", line 2471, in _execute_watcher
watcher.fn(*args, **kwargs)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/streams.py", line 777, in _watcher
self.trigger([self])
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/streams.py", line 189, in trigger
subscriber(**dict(union))
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 243, in refresh
raise e
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 239, in refresh
self._trigger_refresh(stream_key)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 257, in _trigger_refresh
self.update(key)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 956, in update
item = self.__getitem__(key)
^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 443, in __getitem__
self.update_frame(frame)
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/bokeh/element.py", line 2014, in update_frame
ranges = self.compute_ranges(self.hmap, key, ranges)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 614, in compute_ranges
self._compute_group_range(group, elements, ranges, framewise,
File "/home/user/.anaconda3/envs/holoviz_error/lib/python3.11/site-packages/holoviews/plotting/plot.py", line 862, in _compute_group_range
filtered = [r for i, r in zip(ids, values[g]) if i not in prev_ids]
~~~~~~^^^
KeyError: 'factors'
compute_ranges looks to be the culprit.
Screenshots or screencasts of the bug in action
Image of the blank plots. There should be a scatter marker at (1, 1)
I may be interested in making a pull request to address this
The text was updated successfully, but these errors were encountered:
Same error as #5412, but this example doesn't use
streamz
.ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)
Used a fresh holoviews installation using the instructions from installation page.
Relevant conda environment from
mamba list
OS info:
Description of expected behavior and the observed behavior
This error shows up when all conditions below are met:
pn.widgets.CheckBoxGroup
.hvplot
plotting methods with thehover_cols
argument.hv.linked_selection.interaction()
.The expected behavior would be for the markers associated with the newly checked checkbox to appear in the plots.
The observed behavior is a
KeyError
from python and blank plots in the browser.Note that if
hover_cols
isn't specified, or only one plot is passed tohv.linked_selection.interaction()
this error doesn't occur. There's something about specifyinghover_cols
and having more than one plot in an interactive layout.Complete, minimal, self-contained example code that reproduces the issue
I've tested this in a notebook and using the
panel serve test.py
command on the below code.Stack traceback and/or browser JavaScript console output
Stack traceback from panel server:
compute_ranges
looks to be the culprit.Screenshots or screencasts of the bug in action
Image of the blank plots. There should be a scatter marker at (1, 1)
The text was updated successfully, but these errors were encountered: