You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
believe that the main cause is component property values that aren't the correct type.
I discovered the example when building a multi-page app. The dcc.Location object fires before the page with the component loads. I'll use the "hidden div" trick instead.
Minimal example. A cut and paste from https://dash.plot.ly/state with input 2 commented out and supress_callback_exceptions set to True.
# -*- coding: utf-8 -*-
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.config['suppress_callback_exceptions']=True
app.layout = html.Div([
dcc.Input(id='input-1-state', type='text', value='Montréal'),
# dcc.Input(id='input-2-state', type='text', value='Canada'),
html.Button(id='submit-button', n_clicks=0, children='Submit'),
html.Div(id='output-state')
])
@app.callback(Output('output-state', 'children'),
[Input('submit-button', 'n_clicks')],
[State('input-1-state', 'value'),
State('input-2-state', 'value')])
def update_output(n_clicks, input1, input2):
return u'''
The Button has been pressed {} times,
Input 1 is "{}",
and Input 2 is "{}"
'''.format(n_clicks, input1, input2)
if __name__ == '__main__':
app.run_server(debug=True)
The text was updated successfully, but these errors were encountered:
As per "Dash: A Pleasant and Productive Development Experience" https://github.com/plotly/dash/issues/125 I have found another cause of the "Error loading dependencies" error message.
The error fires when the component does not exist. Similar to already suspected problem:
@chriddyp
I discovered the example when building a multi-page app. The dcc.Location object fires before the page with the component loads. I'll use the "hidden div" trick instead.
Minimal example. A cut and paste from https://dash.plot.ly/state with
input 2
commented out andsupress_callback_exceptions
set to True.The text was updated successfully, but these errors were encountered: