i just installed the latest version of streamlit.
And i am facing the issue in uploading a csv file from local machine through file_uploader and converting it into a pandas data frame using pd.read_csv(). be low is my code.
Please suggest what am i missing here
def csv_test_input(df_train): """ Function to take File based inputs for Network parameter """ uploaded_file = st.sidebar.file_uploader("Telecom Network Test-Data", type="csv") if uploaded_file is None: return None text_io = io.TextIOWrapper(uploaded_file) inputDF = pd.read_csv(text_io) return inputDF
on the first run everythings works fine, but i am getting error on rerun of the app.
Error that i am getting is
ValueError: I/O operation on closed file.
at line text_io = io.TextIOWrapper(uploaded_file)
Can you let me know how to fix this issue.