St.cache_data warning on AWS

I put a streamlit app on aws with which I upload a simple excel file that is read by pandas library. I activated the @st.cache_data decorator (previously it was st.experimental_memo with the option to suppress the warning), but unfortunately a warning appears.

It looks like a bug. How can I fix it without downgrading and going back to the old version of streamlit? Thank you

Hey @Fabio_Pasquarella , can you please share your github repo or code snippet ?

Hello, here you are:

def load_excel():
    object = client.get_object(Bucket='<NAME>', Key='x.xlsx')
    data = object['Body'].read()
    df = pd.read_excel(io.BytesIO(data))
    df.dropna(inplace=True, axis=1, how='all')
    return df

please is there anyone who can tell me something about this issue? Thank you

The warning doesn’t come from the code you posted. It comes from some other part of the code where st.cache is being used.

@Goyo you’re right, there was a piece of code that shouldn’t have been there, thank you

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.