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

ERROR: 'Document' object has no attribute '_callbacks' #2755

Closed
MarcSkovMadsen opened this issue Sep 19, 2021 · 4 comments · Fixed by #2760
Closed

ERROR: 'Document' object has no attribute '_callbacks' #2755

MarcSkovMadsen opened this issue Sep 19, 2021 · 4 comments · Fixed by #2760
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Sep 19, 2021

I've just installed Panel from scratch according to the developer guide https://panel.holoviz.org/developer_guide/index.html.

When I panel serve 'script.py' --autoreload --show I get

ERROR: 'Document' object has no attribute '_callbacks'

(I installed this from scratch as I got the same error in my existing installation).

script.py

import panel as pn
import pandas as pd
import param

pn.extension()

data = pd.DataFrame()

class MyDataClass(param.Parameterized):
    data = param.DataFrame()

my_data = MyDataClass()

button = pn.widgets.Button(name="UPDATE")

@param.depends(button.param.value)
def update(value):
    my_data.data = pd.DataFrame({"x": [1]*10})

pn.Column("# Test", pn.Param(my_data), button).servable()
@MarcSkovMadsen MarcSkovMadsen added the TRIAGE Default label for untriaged issues label Sep 19, 2021
@MarcSkovMadsen MarcSkovMadsen added type: bug Something isn't correct or isn't working and removed TRIAGE Default label for untriaged issues labels Sep 19, 2021
@MarcSkovMadsen MarcSkovMadsen added this to the 0.13.0 milestone Sep 19, 2021
@maximlt
Copy link
Member

maximlt commented Sep 19, 2021

What version of bokeh do you have?

@maximlt
Copy link
Member

maximlt commented Sep 19, 2021

Without #2741 being merged it's likely that you end up with a 2.3 version instead of the actually required 2.4 one.

@hoxbro
Copy link
Member

hoxbro commented Sep 19, 2021

I'm having the same problem and I'm running on master branch of panel and bokeh version 2.4.0. The problem only happens when running panel serve with --autoreload. The error is coming from:

doc._callbacks[None] = {}

@philippjfr
Copy link
Member

Damn, looks like we indeed missed a compatibility change with Bokeh 2.4 and will likely have to release another patch release (i.e. 0.12.4).

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.

4 participants