Skip to content

St.file_uploader not allowing me to upload files #5778

@cwmattei

Description

@cwmattei

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

I was using st.file_uploader in Pycharm, and everything was working until randomly, I wasn't able to upload files when I ran the streamlit app. Now, when I click on "Browse Files" in the app, nothing happens and the outline of the box becomes red when I click on it.

Reproducible Code Example

import streamlit as st

upload = st.file_uploader("Upload Data Here")

if upload is not None:
    data = pd.read_excel(upload)

Steps To Reproduce

  1. Import streamlit
  2. Add a file uploader to the code
  3. run streamlit and try uploading a file

Expected Behavior

When you run streamlit, you can click "Browse Files," and then choose a file. It will then proceed to run the rest of your code.

Current Behavior

I click on "Browse Files," and nothing happens. If I click on the upload widget, the box outline becomes red.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.11.0
  • Python version: 3.10.4
  • Operating System: MacOs 12.5
  • Browser: Chrome
  • Virtual environment: Conda

Additional Information

Screen Shot 2022-11-28 at 2 09 04 PM

Screen Shot 2022-11-28 at 2 10 20 PM

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions