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

panel example gives AttributeError: 'DummyComm' object has no attribute 'kernel' #138

Open
lalligagger opened this issue Jun 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@lalligagger
Copy link

I was hoping to integrate solara into an existing Panel app. Using the example provided on Solara's "Self Hosted" docs gives the error above. Here's the full traceback:

2023-06-03 09:52:02,888 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x127a77990>: 'DummyComm' object has no attribute 'kernel'
File 'ipywidget.py', line 70, in _on_widget_constructed:
isinstance(widget.comm.kernel, PanelKernel))): Traceback (most recent call last):
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/bokeh/application/handlers/code_runner.py", line 231, in run
    exec(self._code, module.__dict__)
  File "/Users/lalligagger/py_dev/langEO/solara_in_panel.py", line 17, in <module>
    pn.panel(button_widget).servable()
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/viewable.py", line 391, in servable
    self.server_doc(title=title, location=location) # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/viewable.py", line 1023, in server_doc
    model = self.get_root(doc)
            ^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/pane/base.py", line 418, in get_root
    root_view, root = self._get_root_model(doc, comm, preprocess)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/pane/base.py", line 343, in _get_root_model
    root = self.layout._get_model(doc, comm=comm)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/layout/base.py", line 170, in _get_model
    objects, _ = self._get_objects(model, [], doc, root, comm)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/layout/base.py", line 155, in _get_objects
    child = pane._get_model(doc, root, model, comm)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/pane/ipywidget.py", line 72, in _get_model
    model = self._get_ipywidget(self.object, doc, root, comm, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/pane/ipywidget.py", line 60, in _get_ipywidget
    _on_widget_constructed(w, doc)
  File "/Users/lalligagger/miniconda3/envs/langchain/lib/python3.11/site-packages/panel/io/ipywidget.py", line 70, in _on_widget_constructed
    isinstance(widget.comm.kernel, PanelKernel))):
               ^^^^^^^^^^^^^^^^^^
AttributeError: 'DummyComm' object has no attribute 'kernel'

Using panel 1.0.4 and bokeh 3.1.1

@maartenbreddels maartenbreddels added the bug Something isn't working label Jun 14, 2023
@maartenbreddels
Copy link
Contributor

That worked before, so we probably introduced a bug.
Can I ask why you want to have it running in a panel server?

@lalligagger
Copy link
Author

lalligagger commented Jun 14, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
2 participants