Error: Request failed with status code 500

My app (https://share.streamlit.io/Alex-Robson/PlantPal/master/streamlit_app.py/+/) used to take file uploads fine but now appears to throw an error no matter the file I choose.

Do you have any suggestions?

Not sure if this is the exact issue, but recently we released an update to File Uploader so that results in backwards-breaking changes; perhaps that’s the cause of your issue?

(One way to check might be to see which version your app was working on; if it worked on 0.67.2 but not 0.68 then that’s probably the culprit)

One of the changes:

The behavior of st.file_uploader no longer autodetects the file’s encoding.
This means that all files will be returned as binary buffers. If you need to
work with a string buffer, you can convert to a StringIO by decoding the binary
buffer as shown below:

file_buffer = st.file_uploader(...)
string_io = file_buffer.decode()
2 Likes