When i receive something URL
Like http://127.0.0.1:4444/?project_key=alsndkfnel
Then Use dcc.Location and extract alsndkfnel
And Using Dropdown Meny choice bar or pie
So i want to see that alsndkfnel & bar or pie
But i have ID not found in layout
import re
import flask
from dash import dcc
from dash import html
from dash import Dash
from dash.dependencies import Input, Output
app = Dash(__name__)
app.layout = html.Div([
dcc.Location(id='url', refresh=False),
dcc.Dropdown(options=['bar', 'pie'], id='dropdown', multi=False, value='bar', placeholder='Select graph type'),
html.Div(id='page-content'),
# html.Div(id='see1')
])
@app.callback(
Output('see1', 'options'),
Input('url', 'search') )
def ex_projecKey(search):
return re.search('project_key=(.*)', search).group(1)
@app.callback(
Output('page-content', 'children'),
Input('see1', 'options'),
)
def update_page(value):
return value
if __name__ == '__main__':
app.run_server(debug=True, port=4444)
Error :slight_ Attempting to connect a callback Input item to component:
“see1”
but no components with that id exist in the layout.
If you are assigning callbacks to components that are
generated by other callbacks (and therefore not in the
initial layout), you can suppress this exception by setting
suppress_callback_exceptions=True
.
This ID was used in the callback(s) for Output(s):
page-content.children
from dash import Dash
but no components with that id exist in the layout.
If you are assigning callbacks to components that are
generated by other callbacks (and therefore not in the
initial layout), you can suppress this exception by setting
suppress_callback_exceptions=True
.
This ID was used in the callback(s) for Output(s):
page-content.children