I'm trying to create a dependent dropdown in **dash/plotly**, based on the unique values from the column depending on what is selected in the first dropdown. I created a chained callback and visually, the graph is updating correctly and the dropdowns are populating correctly. However, I receive an KeyError for one of my fields (`Category`, which has nothing to do with the dropdowns, it simply colors the categories), after a fair amount of tinkering I still can't figure out what's causing it. Here's my layout, callbacks and the error I'm getting in the debug environment:

```
    #Layout
    app.layout = html.Div(children=[

    dcc.Dropdown(id='select_game',
                 options=[
                     {"label": "Harry Potter and the Philosopher's Stone (HP1)", "value":"HP1"},
                     {"label": "Harry Potter and the Chamber of Secrets (HP2)", "value":"HP2"},
                     {"label": "Harry Potter and the Prisoner of Azkaban (HP3)", "value":"HP3"},
                     {"label": "Harry Potter and the Goblet of Fire (HP4)", "value":"HP4"}
                     ],
                 multi=False,
                 value="HP1",
                 clearable=False, className = 'dcc-compon'

        ),

    dcc.Dropdown(id='select_platform',
                 options=[],
                 multi=False,
                 clearable=False, className = 'dcc-compon'

        ),    
    html.Br(),
    dcc.Graph(id="wrprogvis", figure={}),

], style={'font-family':'bahnschrift'})

#Chained callback
@app.callback(
    Output('select_platform', 'options'),
    Input('select_game', 'value')
    )

def get_platforms(select_game):
    wrcombo_plts = wrcombo[wrcombo['Game']==select_game]
    return [{'label': i, 'value': i} for i in wrcombo_plts['Platform'].unique()]
    print(wrcombo_plts['Platform'].unique())

@app.callback(
    Output('select_platform', 'value'),
    Input('select_platform', 'options')
    )

def slct_platform(select_platform):
    return[k['value'] for k in select_platform][0]

@app.callback(
        Output(component_id='wrprogvis', component_property='figure'),
        [Input(component_id='select_game', component_property='value'),
         Input(component_id='select_platform', component_property='value')
         ]
       )

#Graph build
def update_graph(game_slct, plat_slct):

    wrcombo_ = wrcombo.copy()
    wrcombo_ = wrcombo_[wrcombo_['Game']==game_slct]
    wrcombo_ = wrcombo_[wrcombo_['Platform']==plat_slct]

    wrfig = px.line(wrcombo_, x='Date', y='Time', color='Category', custom_data=['Runner', 'Game', 'Notes'], height=600)
    wrfig.update_traces(
        mode="markers+lines", 
        hovertemplate='<b>%{customdata[0]}</b><br>Time: %{y|%H:%M:%S} <br>Achieved on: %{x|%e %b %Y} <br>Notes: %{customdata[2]}'
        )

    wrfig.update_layout(yaxis_tickformat='%H:%M', title_font={"family": "Bahnschrift"}, legend_font_family="Bahnschrift", legend_title_font_family="Bahnschrift")
    wrfig.update_xaxes(
            title_font = {"family": "Bahnschrift"},
            tickfont = {"family": "Bahnschrift"},
            showspikes=True
        )

    wrfig.update_yaxes(
            title_font = {"family": "Bahnschrift"},
            tickfont = {"family": "Bahnschrift"},
            showspikes=True,
    )

    return wrfig

```

**Error:**

```
KeyError: 'Category'
Traceback (most recent call last)

    File "HPWRprog.py", line 194, in update_graph

    wrfig = px.line(wrcombo_, x='Date', y='Time', color='Category', custom_data=['Runner', 'Game', 'Notes'], height=600)

    File "_chart_types.py", line 252, in line

    return make_figure(args=locals(), constructor=go.Scatter)

    File "_core.py", line 1889, in make_figure

    for val in sorted_group_values[m.grouper]:

    KeyError: 'Category'

Traceback (most recent call last):
  File "HPWRprog.py", line 194, in update_graph
    wrfig = px.line(wrcombo_, x='Date', y='Time', color='Category', custom_data=['Runner', 'Game', 'Notes'], height=600)
  File "_chart_types.py", line 252, in line
    return make_figure(args=locals(), constructor=go.Scatter)
  File "_core.py", line 1889, in make_figure
    for val in sorted_group_values[m.grouper]:
KeyError: 'Category'

```

Appreciate any help in advance!

edit: callback graph is showing an unwanted callback, I don't want graph update to be triggered until the options are updated (i.e. the path on the right). is there any way I can prevent this?
[callback graph](https://i.stack.imgur.com/Os8o3.png)