Hello, I’m trying to run a Python dash project of an interactive dashboard. However, I received the following error message on one page with a defined table:
“Callback error updating … figure…”:
dash._grouping.SchemaTypeValidationError: Schema: [<Output reinv-snapshot-graph-backbook_income.figure
>]
Path: ()
Expected type: (<class ‘tuple’>, <class ‘list’>)
Received value of type <class ‘plotly.graph_objs._figure.Figure’>
In the code I define the callback as follows:
@app.callback(
[
Output('reinv-snapshot-graph-backbook_income', 'figure')
],
[
Input('reinv-snapshot-radio-income_table_metric', 'value'),
Input('reinv-snapshot-income_table', 'data'),
],
prevent_initial_call=False,
)
And I use another script which contains the layout:
dbc.Col(
dcc.Graph(
id="reinv-snapshot-graph-backbook_income",
figure={
'layout': PLT_IO_LAYOUT_TEMP,
},
),
width=10,
),
Could anyone help me understand and resolve this issue? Thanks!