dash.exceptions.InvalidCallbackReturnValue: The callback ..image-overlay.figure.. is a multi-output. Expected the output type to be a list or tuple but got Figure({

After making a couple of changes to a figure I suddenly get this error message:
dash.exceptions.InvalidCallbackReturnValue: The callback …image-overlay.figure… is a multi-output.
Expected the output type to be a list or tuple but got Figure({
The appcallback is below, it is supposed to output a figure. I did not change the output argument of the function
and it worked before. The only difference is that I give the figure an additional data frame to get information from. The output should still be the same. What does this error mean?

@app.callback([Output('image-overlay', 'figure')],
              #Output('histogram', 'figure')],
              [Input('image_slider', 'value'),
               ],
              [State('image_list', 'children'),
               State('brightness_slider', 'value'),
               State('flag_storage', 'children')])

You have to give the output as list or tuple.Replace the code by

@app.callback([Output(‘image-overlay’, ‘figure’),
Output(‘histogram’, ‘figure’)],
[Input(‘image_slider’, ‘value’)],
[State(‘image_list’, ‘children’),
State(‘brightness_slider’, ‘value’),
State(‘flag_storage’, ‘children’)])

Hey, thank you for your answer. I did not notice that I had a commented out line in my code, which wasn’t properly displayed here. The correct code would be the following:

@app.callback([Output('image-overlay', 'figure')],
              [Input('image_slider', 'value'),
               ],
              [State('image_list', 'children'),
               State('brightness_slider', 'value'),
               State('flag_storage', 'children')])

But I took your suggestion to try to do the opposite of what you said and supply the ouptut not as a list.
Which actually made it work somehow…