简体   繁体   中英

"The children property of a component is List of a list .." Error in Notebook/Dash plotly

Getting following error while building Dashboard using dash plotly.

After spending hours troubleshooting I found the solution that I like to share.

在此处输入图像描述

While creating a new html element in the Call back there was comma after closing html.Div tag, shown below.

After removing that comma, the fault was gone.

new_element=  html.Div(
                    children=[
                    # html.H5(fact_input,className='text-center text-dark'),
                    dcc.Graph(
                        id={
                            'type': 'dynamic-graph1',
                            'index': n_clicks
                            },
                        figure={}),
                    dcc.Graph(
                        id={
                            'type': 'dynamic-graph2',
                            'index': n_clicks
                            },
                              figure={}),       
                    ],                              
                  ), <------------------------------------FAULT
    div_children.append(new_element)
    return div_children

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM