✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Error: options[].label in Dropdown .. is required but it was not provided

Hi all,

I have a problem with my Dashboard. When I Start the Dashboard the Browser showes following Error:

“option[10].label in Dropdown with ID “Test_Temp” is required bit it was not provided” (This error originated from built-in JavaScript code that runs Dash apps."

(This error is also for two other Dropdowns, but the rest works fine)

My problem is, that this only appears on an other PC. (Same Chromebrowser version). On my PC there are no errors at all.

Doesnt work:

html.Label(’ Test Temperature Filter’,style={‘color’: ‘#283e3e’, “family”: “Helvetica Neue, monospace”, “fontSize” : ‘18px’}),
options=[{‘label’:i, ‘value’:i} for i in df[‘RTB_Test_Temp’].unique()],
multi = True,
className = ‘Dropdown’,
value = df[‘RTB_Test_Temp’].unique()),
], style={‘marginBottom’: 10, ‘marginTop’: 2, ‘marginLeft’: Border_left,‘marginRight’: Border_right})],zDepth=Depth),


html.Label(’ Testvariant Filter’,style={‘color’: ‘#283e3e’, “family”: “Helvetica Neue, monospace”, “fontSize” : ‘18px’}),
options=[{‘label’:i, ‘value’:i} for i in df[‘RTB_Testvariant’].unique()],
multi = True,
className = ‘Dropdown’,
value = df[‘RTB_Testvariant’].unique()),
], style={‘marginBottom’: 10, ‘marginTop’: 2, ‘marginLeft’: Border_left,‘marginRight’: Border_right})],zDepth=Depth),

Has anybody an idea what could be the issue here?


  • Dashboard works on my PC fine, same Dashboard has errors at an other pc
  • Some Dropdowns work, some do not

(Sorry for my english, its not my native language)

1 Like

Hi all,

FYI: I found and fixed the problem even if i do not understand why this is an issue on other PC’s but not on mine.

In my Dataframe there are some rows which include empty parts. E.g.: Value1,Value2 ,Empty, Value4…
This empty parts are translated to NaN by pandas and this causes the errors. When I replace all NaN by an value everything works fine.


df[‘RTB_Test_Temp’] = df[‘RTB_Test_Temp’].fillna(9999)


I wanted to let you know that I had the same issue. With your helped I’ve managed to fix it. Thanks!

1 Like

I think the new version of dash doesn’t allow null values as they were ok in dropdown menus before. When building your dropdown menu options you can filter out the null values. Here is an example of how I did that using a function that takes the dataframe and columns as inputs.

def generate_options(dftemp,col):
    tempdict = defaultdict(int)
    for val in dftemp[col]:
        if val:
    temp_options = []
    for tup in sorted(tempdict.items(),key=lambda x:x[1],reverse=True):
    return temp_options