I just had an error when upload a xlsx file. it shows error " AxiosError: Request failed with status code 500". My app is working well on 7/27 but there must be some overnight changes that trigger this one.
The strange thing is there is NO error if I run it on Firefox. Chrome and Edge both have this error…any help? And I tried to downgrade to version 1.23 and 1.24, both are not working.
Having the same issue. I have 2 separate frontends (one is react hosted on AWS amplify and the other is nextjs hosted on vercel). Each embeds a streamlit app, which itself requires a file upload. Up till a few days ago, these were working normally. But for some reason, now I also get the same error - “AxiosError: Request failed with status code 500”. The timeline seems to match what @John_K reported above. Is this a streamlit cloud side issue or something I have to change in my app?
Same story here, upload form is working on Firefox but not on Chrome/Edge (on Windows 10, but other users experienced the same behaviour on mobile browsers).
I’ve tried this feature out and it works fine on React or Next-based interfaces. Feel free to check out my project here with that same feature enabled: https://pneumoscan.vercel.app/
The code chunk I used to embed it had an api query of embedded set to true: > <iframe
Some feedback from @kajarenc, one of our Software engineers:
After investigation, my best understanding is that file_uploader fails for apps deployed in Streamlit Cloud because of a misconfigrued _xsrf token, the interesting thing is that xsrf protection is disabled for all Cloud apps, but for some reason old apps still running with --enableXsrfProtection=true and just rebooting it doesn’t change it. But creating a container from scrach (attempt to deploy that app with a different domain?) solves that problem.
So the solution for Streamlit Cloud apps will be either try to redeploy the app (not just reboot), or explicitly specify:
[server] enableXsrfProtection = false
in app config.toml
If you’re still facing the issue, could you please try one of these solutions?
This method did not help me, I have the application running locally on the server and inserted by container to the site, maybe there are some other ways to solve in my case?
I started learning Streamlit recently. While trying to implement a very simple file uploader application locally, I am getting the same error. Sharing the code and the error too.
Streamlit version 1.30.0, OS Windows 8.1
File upload tutorial
#core packages
import streamlit as st
File processing packages
from PIL import Image
#load images
#@st.cache#used to make the load process faster
def load_image(image_file):
img=Image.open(image_file)
return img
def main():
st.title(“File upload tutorial”)
menu=[“Home”,“Dataset”,“DocumentFiles”,“About”]
choice=st.sidebar.selectbox(“Menu”,menu)
if choice==“Home”:
st.subheader(“Home”)
image_file=st.file_uploader(“Upload Images”,
type=[“png”,“jpg”,“jpeg”])
if image_file is not None:
st.write(type(image_file)) #methods/attributes #st.write(dir(image_file))
file_details={“filename”:image_file.name, “filetype”:image_file.type,“filesize”:image_file.size}
st.write(file_details)
st.image(load_image(image_file),width=250,height=250)
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.