Callback init() TypeError under Windows 10

Hello dash/plotly comunity!
I’m new to python in general and particularly with dash.

I write a script on linux (see below) including callbacks, working fine (layout+callback):

import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State 
from dash.exceptions import PreventUpdate

app = dash.Dash(__name__)
server = app.server
app.config['suppress_callback_exceptions'] = True

app.layout = html.Div([

    html.Div([
        html.Div([                
            html.Div([     
                ........................
                            html.Div([
                                html.Div([
                                    html.Div([
                                        html.P('Min')
                                    ]),
                                    html.Div([
                                        dcc.Input(
                                            id='Min',
                                            type='number',
                                            value=data[:,quantities.index(quantity)].min(),
                                        ),
                                    ])
                                ]),

                                html.Div([
                                    html.Div([
                                        html.P('Max')
                                    ]),
                                    html.Div([
                                        dcc.Input(
                                            id='Max',
                                            type='number',
                                            value=data[:,quantities.index(quantity)].max(),
                                        )                                      
                                    ])                                       
                                ]),

                            ],className='row'),

                ......................................

    ], className='row'),
])

#-------------- Callbacks -------------------
# ----------- Min/Max value -----------
@app.callback([
    Output('Min','value'),
    Output('Max','value'), 
],  [
    Input('Value_3d','value')
    ]
)

def update_slider(value):
    if value is None:
        raise PreventUpdate
    else:
        valuemin = data[:,quantities.index(value)].min()
        valuemax = data[:,quantities.index(value)].max()
        return valuemin, valuemax

But when I try to launch on my windows computer using my python env in anaconda. If I comment my callback the layout is working fine, otherwise it’s returning an error message :

Output('Min','value'),
TypeError: __init__() takes exactly 1 argument (3 given)

And I have no clue … Do you have any idea to solve or overpass it ?
Many Tanks

Hi @JBLwar, welcome to the forum! Did you include all your script? You also need to call app.run_server at the end of the script like

if __name__ == '__main__':
    app.run_server(debug=True)

Can you also tell us how you run the script in linux or python? Just typing python myscript.py in a terminal?

Hi @Emmanuelle, thanks for the quick reply !

Yes it’s already include in my script, forgot to mention it.

On my windows 10 computer, in an anaconda terminal, I just type python myscript.py.
On my linux based computer, just type the same in a terminal and working fine.

What is the version of Dash you are using on Windows? Is it compatible with multi-output? If you’re not using the latest version of Dash you can try to upgrade it.

Thank you for the tip ! Actually it was not the version of Dash but the version of Anaconda that was outdated.