I’m trying to deploy my streamlit app and learning how to do it at the same thime. In the local way, the streamlit app works.
Here how it works : I have “donnees.py” which is my script with all the function I need for the preprocessing and the modelisation. And I have “streamlit_appw.py” which is the script for the streamlit app. When I run “streamlit_appw.py” it seems that all the error are related to the first script “donnees.py”. After several try, It seems that Streamlit doesn’t take in count my script “donnees.py” because all the errors refers to the functions declare in “donnees.py”.
It looks like there’s an error with one of the underlying files in your dataset. The two things that I did to help debug this were:
Look at the logs in the sidebar (that way you can see the actual error message). I deployed a fork of the repo in order to do this on my own, and I saw
AttributeError: 'DataFrame' object has no attribute 'imageid'
Note that there is a column called imageid;;;;;;;;;;....
My guess is that you are using semicolons to separate the columns in your csv, and pandas is expecting commas, so you need to pass an extra argument when reading the csv to tell it to use semicolons.
However, the main thing is that you can use these techniques to do your own digging in and debugging. Hope that’s helpful!
(P.S. For a large dataset, you might consider using parquet rather than csv, as it will be more compressed, and tends to have fewer problems than csv. It’s not human-readable as a file, but with files that are large, that doesn’t tend to matter too much).