Preview release of the file uploader widget. To try it out just call st.file_uploader! Note that as a preview release things may change in the near future.
Looking forward to hearing input from the community before we stabilize the
API!
Support for emoji codes in st.write and st.markdown! Try it out with st.write("Hello :wave:").
Breaking changes:
st.pyplot now clears figures by default, since that’s what you want 99% of
the time. This allows you to create two or more Matplotlib charts without
having to call pyplot.clf
every time. If you want to turn this behavior off, use st.pyplot(clear_figure=False)
st.cache no longer checks for input mutations. This is the first change
of our ongoing effort to simplify the caching system and prepare Streamlit
for the launch of other caching primitives like Session State!
Great news, I was looking forward to the file uploader function.
However, I’m getting a **AttributeError** : 'module' object has no attribute 'file_uploader error when trying to run locally
import streamlit as st
st.file_uploader('test')
EDIT: installing matplotlib 2.0.0 seems to have partially fixed the problem as scikit-image 0.14.1 required it. The widget appears in the app now but I’m getting a pop-up error
##### Bad message format
Tried to use SessionInfo before it was initialized
@QAInsights, thanks for the reply on this and I passed the information on to the team. Looking into it now and will get back to everyone as soon as possible.
Thanks for creating the issue! I just posted in there but wanted to sync up with this thread too, so I’ll repost here:
I’m trying to repro this, but having trouble. Here’s what I did:
Install Windows 10 VM
Installed Anaconda
Open a new conda environment
pip install streamlit
streamlit hello
…and it works fine.
Can you provide a little more info on how to reproduce?
Also: Can you try force-reloading your browser tab? Try Shift-F5 or Ctrl-Shift-R .
It’s possible you’re using an old tab that has version 0.51.0 of our Javascript running. (Which is something that we’re fixing right now, actually! See #536 )
hi thiago
I am getting the same error.
I first installed with “pip install streamlit” but no new version was found, only after using “pip install streamlit == 0.52.0” the new version was installed and produced the error message. reverting back to 0.51.0 solved the problem. Looking forward to the new realease, sounds really exciting!
Clearing the browser cache did not resolve - still got the pop-up message. I did go into debug mode and this is what appears after visiting the URL:
Reusing preheated context for ws <streamlit.server.Server._BrowserWebSocketHandler object at 0x000002222601A710>
Server state: State.WAITING_FOR_FIRST_BROWSER -> State.ONE_OR_MORE_BROWSERS_CONNECTED
Report finished successfully; removing expired entries from MessageCache (max_age=2)
Received the following back message:
update_widgets {
}
Skipping rerun since the preheated run is the same
EDIT: Forgot to add that when reverting to 0.51.1, I no longer get the pop-up message.
How do I open image in opencv. I have this code which gets uploaded image and displays it on streamlit:
uploaded_file = st.file_uploader("Choose a image file")
if uploaded_file is not None:
image = uploaded_file.read()
img = st.image(image, caption='Sunrise by the mountains', use_column_width=True)
My question is I want to read and save this uploaded file using:
I did a fresh install on Linux in a virtualenv and found the media folder missing with the static font and icon files. Anybody seeing the same issue. That happens already on 0.52.1.
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.