I recently installed Visual Studio Code (VS Code) and set up Streamlit. When I run my app with:
streamlit run app.py
The terminal says everything runs fine, and the browser opens at localhost:8501, but the webpage stays completely blank — no content or errors appear.
Here’s what I’ve tried so far:
Verified no errors show in the terminal or browser console.
Tried running a basic script like:
import streamlit as st
st.title(“Hello, Streamlit!”)
st.write(“If you can see this, Streamlit works ”)
Still, nothing appears in the browser.
Opened in different browsers (Chrome, Edge, Incognito mode).
Checked Streamlit’s config (streamlit config show) — the server is running on localhost:8501 without issues.
Ensured the Python extension in VS Code is installed and working.
And everything is working Fine in Pycharm
I completely uninstalled and reinstalled VS Code and Streamlit — but the problem persists.
System info:
Windows 10/11 (mention your OS version)
Python version (python --version)
Streamlit version (streamlit --version)
VS Code version
Does anyone have a fix or has faced this before? Would appreciate any help!
Double check that the file has been saved with the changes.
Double check you are running the file you think you are. (especially if you have another file of the same name in another directory)
When you see the blank screen, does that include the app menu in the upper-right corner? Is it just the page contents that are missing, or is the app menu missing, too?
Hey
I have double check everything and
I have also tried though different laptop then streamlit is working fine but un my laptop doesnt work and the other think is if i tried though Pycharm then streamlit working fine
also i have tried streamlit Hello on terminal that is working fine but when i tried my working file it doesn’t work browser open and screen is blank
When you say the screen is blank, does that include the app menu in the upper right corner, or do you just mean the body of the page? (If you can see the menu then Streamlit might be running a different file, one without Streamlit commands saved in it.)
I’m not sure what to suggest. If it runs from one terminal in Pycharm, but not a different terminal, I can only guess that there is some mix up with an environment, your PATH, or directory location. However, it’s really difficult to diagnose that from here.
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.