I/o operation on closed file - Error

Since the 0.84.0 upgrade, the file_uploader function is putting my app down. I get the error : “i/o operation on closed file” but my code didn’t change between the 2 version of Streamlit.
I use this code :

uploaded_file = st.sidebar.file_uploader(“Chargez votre dataset :books:”, type=[‘csv’, ‘xls’])
if state.data is None:
st.write(“test1”)
try:
if ‘csv’ in file_details[‘FileName’]:
st.write(“test2”)
if state.separateur is not None:
st.write(“sep”)
data = pd.read_csv(uploaded_file, sep=state.separateur, engine=‘python’)
state.data = data
else :
st.write(“pas sep”)
data = pd.read_csv(uploaded_file, engine=‘python’)
state.data = data
st.write(data)
st.write(state.data)
else:
if state.separateur is not None :
data = pd.read_excel(uploaded_file, sep=state.separateur, engine=‘python’)
state.data = data
else :
data = pd.read_csv(uploaded_file, engine=‘python’)
state.data = data
except :
st.warning(“error”)

How to fixe that ? Thanks !