"IncorrectTypeException" in my dashboard program

Viewed 109

I'm having problems with my callback function and am trying to debug my code. It's got multiple outputs that are supposed to show graphs.

@app.callback([ [Output(component_id='plot1', component_property='children'),
            Output(component_id='plot2', component_property='children'),
            Output(component_id='plot3', component_property='children'),
            Output(component_id='plot4', component_property='children'),
            Output(component_id='plot5', component_property='children')],
          [Input(component_id='input-type', component_property='value'),
            Input(component_id='input-year', component_property='value')],

           [State('plot1', 'children'), State('plot2', 'children'),
            State('plot3', 'children'), State('plot4', 'children'),
            State('plot5', 'children')]
          ])

I'm not entirely sure what's the problem, but I think it has something to do with my output parameters. At first I thought there was something wrong with the tuples, then I checked if it was an indention error. I even checked if it had something to do with the divisions that had 'plot4' & 'plot5'. I spent the better part of 4 hours looking for references on what could be the cause of the error. I think it has something to do with my output, but I don't know what's the cause.

I tried contacting the instructors but no help.

Any help will be greatly appreciated. Error Code

1 Answers

Turns out I had an extra set of brackets in the callback statement. Live and learn.

Related