当前位置: 代码迷 >> 综合 >> 【Dash】报错TypeError: The `dash_html_components detected a Component for a prop other than `children`
  详细解决方案

【Dash】报错TypeError: The `dash_html_components detected a Component for a prop other than `children`

热度:65   发布时间:2023-11-14 11:51:48.0

TypeError: The `dash_html_components.Div` component (version 1.0.2) with the ID "Div(Graph(id='XXX'))" detected a Component for a prop other than `children`
Did you forget to wrap multiple `children` in an array?
Prop id has value Div(Graph(id='XXX'))

心好痛,感觉自己不具备调试能力

出这个错,比如说上一级是html.Div,如果子组件>=2,则需要用列表框起来;

也就是:html.Div([A, B])

原答地址:https://community.plot.ly/t/dcc-datepickerrange-error/35124

  相关解决方案