Off late, I’m experiencing a weird phenomenon in that I can’t launch my Streamlit app as before by running the generated url on my browser without restarting my computer. I get the url generated by running the command ‘streamlit run app.py’ but when I copy and run the url in the browser it wont launch. The url is not the problem per se as it is just as it was before: http://my_public_IP_address:8501.
However, if I restart my computer and freshly generate the url it launches the very first time and then quit working afterwards. Has anyone experienced this before? I’m new to programming so not sure what is happening with the IP address and the port and I doubt if this issue stems from Streamlit itself.
Kindly shed some light into the issue if you can figure out what could be causing it.
Thanks for the question. That indeed sounds like a strange issue that may not be related to Streamlit directly.
Can you tell us what OS you’re running Streamlit on?
I’m guessing your machine either isn’t fully shutting down some Python processes, or it isn’t giving back the ports Streamlit was claiming. Problem-solving is going to hinge on which OS you’re on. Let us know and we’ll try to help!
Thanks for the response. You are right. When I switched the port to custom ones like 8503 it worked. I’m using Win10 btw.
I’ve a question though can we make sure when we terminate Streamlit session the port it is launched from also gets freed up? I ask this because everytime I use a port and terminate the app session that port is unavailable until and unless I restart the computer.
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.