Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Component Registration in self.callback_map KeyError : '.figure'

$
0
0

Hello,

So I use Dash App with Django (Django Plotly Dash) and want to deploy to Heroku.

When I am running in local, I am getting this error, but still displays graph. When I deploy to Heroku, it won’t show anything.

In local:


In heroku:

When I want to delete old output component or want to add a new one, it gives keyerror. It’s in the self.callback_map[target_id][‘inputs’], even when what I change is the Output.

"for component_registration in self.callback_map[target_id][‘inputs’]:
KeyError: ‘grafik_jlh_sekolah.figure’"

So I have
@app.callback(
[Output(component_id=‘output_container’, component_property=‘children’),
Output(component_id=‘grafik_jlh_sekolah’, component_property=‘figure’)],
[Input(component_id=‘select_filter’, component_property=‘value’),
Input(component_id=‘dropdown_provinsi’, component_property=‘value’),
Input(component_id=‘dropdown_kokab’, component_property=‘value’),
Input(component_id=‘dropdown_kec’, component_property=‘value’)]
)

and I want to remove the first output (Output(component_id=‘output_container’))

Also, I want to add a new callback
@app.callback(
[Output(component_id=‘choropleth_sekolah’, component_property=‘figure’)],
[Input(component_id=‘radio_button_choropleth’, component_property=‘value’)]
)

But then, it will give me error
"for component_registration in self.callback_map[target_id][‘inputs’]:
KeyError: ‘choropleth_sekolah.figure’"

My problem is similar to case 14207. But it’s not working for me. I have searched google and try to debug but still unable to solve the problem. Please help.

Thank you so much :smiley:

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles