Hi, I am trying to return a string value to a dcc.Store object, When I try to run the callback, it gives an error saying it expects a list of tuple, even though the store objects data type is set to a string.
dcc.Store(id="SatStore", storage_type='local', data="teststring"),
dcc.Interval(id="UpdateSat", interval=1 * 2000, n_intervals=0),
@app.callback(
[
Output('SatStore', 'data'),
],
[
Input('satellite-dropdown-component', 'value'),
Input('UpdateSat', 'n_intervals'),
])
def update_store(value, n_intervals):
global satellite
ctx = dash.callback_context
# Check which input fired off the component
if not ctx.triggered:
trigger_input = ""
else:
trigger_input = ctx.triggered[0]["prop_id"].split(".")[0]
data = value
satellite = data
if trigger_input == "UpdateSat":
print('trying to update satstore value attempt number: ' + str(n_intervals))
return satellite
else:
print('updating satellite value from slider change')
return satellite
dash.exceptions.InvalidCallbackReturnValue: The callback …SatStore.data… is a multi-output.
Expected the output type to be a list or tuple but got ‘h45-k1’.