FileNotFoundError on streamlit's app online but not in local

Hey, I am trying to deploy my first little app. In same directory of the app i have a data directory with some csv file. When I click on link I have error :
FileNotFoundError: [Errno 2] No such file or directory: ā€˜data/file.csv’

But in local there are functioning so I don’t understand how can I connect the data to my app
the error are in this part of code:
ā€œā€"
Championshipchoice = st.sidebar.selectbox(ā€œwhich Championship do you want ?ā€,(ā€œTirs_Bundesliga.csvā€,ā€œTirs_PL.csvā€,ā€œTirs_liga.csvā€,ā€œTirs_SerieA.csvā€,ā€œTirs_L1.csvā€) )
choice = ā€œdata/ā€ + Championshipchoice
TableChoice = pd.read_csv(choice)
ā€œā€"
So pd.read_csv function don’t find files. I verifying all libraries are in requirements.txt files.

You will probably need to add a path before each filename. Example ./data directory/filename

1 Like

Hi I am in the same problem but thanks to you all, it worked well now to me too. Thanks!

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