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

ChatInterface is broken on 1.3.7rc2 #6241

Closed
pmeier opened this issue Jan 19, 2024 · 4 comments
Closed

ChatInterface is broken on 1.3.7rc2 #6241

pmeier opened this issue Jan 19, 2024 · 4 comments

Comments

@pmeier
Copy link
Contributor

pmeier commented Jan 19, 2024

When you try to send a message you are instantly hit with an error.

import panel as pn
from panel.chat import ChatInterface

pn.extension()


def echo(contents, user, instance):
    return f"{user} said: '{contents}'"


chat_interface = ChatInterface(callback=echo, callback_exception="verbose").show()
Traceback (most recent call last):
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/chat/feed.py", line 486, in _prepare_response
    self._callback_state = CallbackState.RUNNING
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/param/parameterized.py", line 307, in batch_call_watchers
    parameterized.param._batch_call_watchers()
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/param/parameterized.py", line 2506, in _batch_call_watchers
    self_._execute_watcher(watcher, events)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/param/parameterized.py", line 2468, in _execute_watcher
    watcher.fn(*args, **kwargs)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/reactive.py", line 374, in _param_change
    self._apply_update(named_events, properties, model, ref)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/reactive.py", line 302, in _apply_update
    self._update_model(events, msg, root, model, doc, comm)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/layout/base.py", line 119, in _update_model
    super()._update_model(events, msg, root, model, doc, comm)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/reactive.py", line 623, in _update_model
    super()._update_model(events, msg, root, model, doc, comm)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/panel/reactive.py", line 318, in _update_model
    model_val = getattr(model, attr)
  File "/home/philip/.conda/envs/ragna-dev/lib/python3.9/site-packages/bokeh/core/has_props.py", line 357, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'Card' object has no attribute '_callback_state'
@philippjfr
Copy link
Member

Thanks, this seems to have been an issue with the backporting. Will fix now.

@philippjfr
Copy link
Member

@ahuang11 Any idea why this isn't being caught by the test suite?

@philippjfr
Copy link
Member

Fixed in 1.3.7rc3.

@ahuang11
Copy link
Contributor

@ahuang11 Any idea why this isn't being caught by the test suite?

I realized that the errors were piped to the chat logs, rather than raising: #6245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants