Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perspective raises error when trying to filter: ValueError: too many values to unpack (expected 3) #2299

Closed
MarcSkovMadsen opened this issue May 8, 2021 · 1 comment · Fixed by #2300
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

Panel: 0.11.3

When trying to filter by dragging a field the Perspective Viewer raises an error.

perspective-error.mp4
import panel as pn
import pandas as pd

pn.extension("perspective", sizing_mode="stretch_width")

data = pd.DataFrame({
    "Curve": list(range(0,1000)),
    "Other": list(range(0,1000)),
    })
pn.pane.Perspective(data).servable()
$ panel serve 'examples\issue_perspective.py' --auto --show
2021-05-08 19:36:33,523 Starting Bokeh server version 2.3.1 (running on Tornado 6.1)
2021-05-08 19:36:33,525 User authentication hooks NOT provided (default user enabled)
2021-05-08 19:36:33,526 Bokeh app running at: http://localhost:5006/issue_perspective
2021-05-08 19:36:33,526 Starting Bokeh server with process id: 20144
2021-05-08 19:36:35,000 WebSocket connection opened
2021-05-08 19:36:35,001 ServerConnection created
2021-05-08 19:37:24,096 Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x0000015F24436130>>, <Task finished name='Task-174' coro=<_needs_document_lock.<locals>._needs_document_lock_wrapper() done, defined at c:\repos\private\panel_docker\panel\.venv\lib\site-packages\bokeh\server\session.py:51> exception=ValueError('too many values to unpack 
(expected 3)')>)
Traceback (most recent call last):
  File "c:\repos\private\panel_docker\panel\.venv\lib\site-packages\tornado\ioloop.py", line 741, in _run_callback
    ret = callback()
  File "c:\repos\private\panel_docker\panel\.venv\lib\site-packages\tornado\ioloop.py", line 765, in _discard_future_result
    future.result()
  File "c:\repos\private\panel_docker\panel\.venv\lib\site-packages\bokeh\server\session.py", line 71, in _needs_document_lock_wrapper
    result = await result
  File "c:\repos\private\panel_docker\panel\.venv\lib\site-packages\tornado\gen.py", line 216, in wrapper
    result = ctx_run(func, *args, **kwargs)
  File "c:\repos\private\panel_docker\panel\panel\reactive.py", line 257, in _change_coroutine
    self._change_event(doc)
  File "c:\repos\private\panel_docker\panel\panel\reactive.py", line 267, in _change_event
    self._process_events(events)
  File "c:\repos\private\panel_docker\panel\panel\reactive.py", line 943, in _process_events
    super(ReactiveData, self)._process_events(events)
  File "c:\repos\private\panel_docker\panel\panel\reactive.py", line 250, in _process_events
    self.param.set_param(**self._process_property_change(events))
  File "c:\repos\private\panel_docker\panel\panel\pane\perspective.py", line 396, in _process_property_change
    msg['filters'] = [[self._as_digit(col), e, val] for col, e, val in msg['filters']]
  File "c:\repos\private\panel_docker\panel\panel\pane\perspective.py", line 396, in <listcomp>
    msg['filters'] = [[self._as_digit(col), e, val] for col, e, val in msg['filters']]
ValueError: too many values to unpack (expected 3)
@MarcSkovMadsen MarcSkovMadsen added the type: bug Something isn't correct or isn't working label May 8, 2021
@MarcSkovMadsen MarcSkovMadsen added this to the v0.11.4 milestone May 8, 2021
@MarcSkovMadsen
Copy link
Collaborator Author

It's the same problem with sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants