Dear Dash community,
I’m using the option to put inputs and states into *args. Working with pandas DataFrame works quite good but I can’t write a simple value to one of the args.
INPUTS = [Input(some inputs), ...] INPUTS.extend([Input(more inputs)]) STATES = [State('xy', 'value')] STATES.extend([State(more States)]) @app.callback( [Output('xy', 'value'), more outputs...], INPUTS, STATES ) def test(*args) convert and write something to args, e.g. xx = args xy = xx if xy == '' or xy is None or xy == : xy = 0 else: xy = xy + 1 return something, ..., xy @app.callback( [Output(outputs), ...], [Inputs(inputs), ... ] [States('xy', 'value'), ...] ) def printing(some inputs, xy_after, some states) print(xy_after)
So, here is my problem. Getting args, assigning a value and returning it works since I see the value 0 here
def printing(inputs, xy_after, more states) print(xy_after)
But when I call def test(*args) again and get args it is an empty tuple again and I see value 0 over and over again. The type of xy is everywhere an int. Do you have any advice for me?
Thanks in advance!