Deployed Streamlit App not working despite no build errors

I work for a healthcare firm and currently package client dashboards as macro-based Excel files (with forms & a hidden application environment) to make it appear as close as possible to a traditional desktop application.

And then I discovered python, and more specifically, Streamlit. I must say that Streamlit is not just awesome, but super awesome. You guys saved and delivered the whole world from HTML/CSS/JS.

However, there is a problem I didn’t foresee: deployment.

I tried deploying a test app on Heroku. It got processed with no errors, but the application page could not be served for some unknown reason. I tried many permutations to the deployment process to no avail.

My IT guy tried deploying on Windows IIS after viewing the YouTube video and the guidance page herein for the same. That didn’t work too.

My app uses the following packages: Streamlit, Pandas, Altair & Ag-grid. And the GitHub repository is shakamoushie / LearnToCode

Besides, the demo package on GitHub, I coded an entire multi-page dashboard application locally. Since this has confidential client data, it can’t be shared.

I am awaiting the Streamlit sharing invite to try out my testapp; also waiting to try out Streamlit for teams for my multi-page work app, which contains confidential data. It would be such a letdown not to be able to use such a wonderful program just because of deployment issues. (I’m sure I must be doing something silly, just don’t know what).

if you sure that there no error in your project ,i don’t think streamlit need deploy in windows. you just need run your app like:

streamlit run the_name_of_your_app.py

if you need run at tcp 80 , you need add --server.port 80

streamlit run the_name_of_your_app.py --server.port 80

there no need IIS

Thank you, I will try this out.

Will this work for multiple streamlit apps accessed by multiple stakeholders at the same time?

Once you had multiple streamlit apps uploaded in heroku (for example) anybody with your app link should be able to access him…

Did you create the files Procfile, requirements.txt and setup.sh before you upload the app at heroku?

I said this because i have been developing a private app at streamlit and all the code and other stuffs are at Github. When i alter something and do a push to Github, automatically heroku catch this and refresh you app with the new features you added.

For exemple:

1) setup.sh:

mkdir -p ~/.streamlit/
echo "\
[server]\n\
headless = true\n\
port = $PORT\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml

2) Procfile:

web: sh setup.sh && streamlit run name_of_your_app_here.py

3) requirements.txt:

streamlit==0.85.0
pandas
numpy
altair
xlrd
openpyxl
streamlit_analytics

For more information, check this out: Getting Started on Heroku with Python | Heroku Dev Center

Thank you, feliperoque, for responding.

I found the problem and I am mentioning it here in case someone else needs it:

  1. The heroku build didn’t throw up any errors, but the application page could not be served
  2. I got my Streamlit sharing invite today and tried it. Streamlit gave me an optional error about a package “openpyxl” which I had not used at all. I used pandas to open my excel file, not openpyxl, but streamlit still gave me an optional warning. So I included this reference into the requirements.txt file
  3. I also realized a .ico file missing from the repository, but I didn’t get any warnings about that.
  4. After remedying point #2 & #3, the app worked perfectly on Streamlit sharing.
  5. (however, on heroku, the app still gives the same error)

Long live Streamlit. Thank you guys for helping me out, and to Streamlit for such an awesome program. Who needs other programming languages now?

:slight_smile:

2 Likes

Hi,
I am having the same error with my app (runs locally with no error online won’t work yet showing no errors).

I built a house price prediction app using a machine learning model that runs locally with no errors when deployed the logs do not show errors (only some warning messages related to the machine learning model). But when pressing the calculate button it won’t show any results below the links to the app and the GitHub repository.

  1. app link
  2. Github

When I run it locally, it works here is a screenshot of the results. Online it will show nothing

I have tried to change streamlit version on requirements.txt downgraded but no luck so far. Any help will be more appreciated