Possible Dash 2.6.0 long_callback bug

Hello! I just upgraded to Dash 2.6.0 to take advantage of the changes to long_callbacks but there seems to be an issue when I attempt to use the background=True flag. I get this error:

for this following piece of code:

@callback(
    output={
        "data": Output(results_table.table, "data"),
        "info_div_style": Output(override_info_div, "style"),
    },
    inputs={'data': Input(upload_store, "data")},
    running=[
        (
                Output("progress_bar", "style"),
                {"visibility": "visible"},
                {"visibility": "hidden"},
        ),
    ],
    prevent_initial_call=True,
    background=True,
    manager=CeleryManager,
    cache_args_to_ignore=['data']
)
def validate_upload_rows(data: str):
    if not data:
        return dict(data={}, info_div_style={})
    upload_df = load_df_from_store(data)
    return_dfs = []
    for index, row in upload_df.iterrows():
        row = row.dropna()
        return_dfs.append(search_api_for_npi(row.to_dict()))
    final_df = pd.concat(return_dfs)
    return dict(
        data=final_df.to_dict(orient="records"), info_div_style={"display": "none"}
    )

I have tried changing the type of cache_args_to_ignore and tried omitting it altogether, as it seems like from the source code that it defaults to an empty list, but nothing seems to work.

Any help would be appreciated!
Thanks!

Hi @gabrielcenteno
Thank you for reporting this. It might be a bug. Can you please use this post content to open an issue on the Dash repo?

sounds good, will do!

1 Like