EMPTY_LAYOUT warning - please let me know what I'm doing wrong

Hello,

I get this warning when a session is rendered. Would anyone know why this is the case please?

W-1002 (EMPTY_LAYOUT): Layout has no children: Column(id=‘1009’, …)

MRE here:

import panel as pn

input_1 = pn.widgets.Select(options=[1, 2, 3, 4], name='Input 1')
input_2 = pn.widgets.Select(options=[1, 2, 3, 4], name='Input 2')


def sidebar():
    return pn.Column(pn.Row(input_1), pn.Row(input_2))


@pn.depends(input_1, input_2)
def main_pane(input1_val, input2_val):
    md = pn.pane.Markdown(f'{input1_val + input2_val}')
    return pn.Row(pn.Column(md))


if __name__.startswith('bokeh'):
    pn.extension()

    t = pn.template.FastGridTemplate(
        site='Panel', title='Test',
        sidebar=sidebar
    )
    t.main[:1, :2] = main_pane
    t.servable()

Thank you very much

JJ

Hi JJ

just change siderbar = sidebar()

t = pn.template.FastGridTemplate(
        site='Panel', title='Test',
        sidebar=sidebar()
    )

the warning will be gone

Kind regards
Victor

3 Likes

Cheers Victor, TYVM. much appreciated!