简体   繁体   中英

Streamlit Python app deployed successfully to Heroku, but I get an application error

So i have a Streamlit Python app I wanted to deploy on heroku, the doployment was successful, but when I open the app it gives me an application error

错误

for starters, here is my requirement file:

wordcloud==1.8.1
xlrd<2.0
pandas<1.2.3
numpy<1.20.1
streamlit==0.79.0
Pillow==8.2.0

and here is my Procfile file:

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

and i did the setup file as well, i followed every step on this video: https://youtu.be/nJHrSvYxzjE when i did this command:

heroku logs --tail

i got this:

2021-04-02T19:26:55.000000+00:00 app[api]: Build started by user 
2021-04-02T19:27:52.901079+00:00 app[api]: Release v5 created by user 
2021-04-02T19:27:52.901079+00:00 app[api]: Deploy 7ca73902 by user 
2021-04-02T19:28:18.000000+00:00 app[api]: Build succeeded
2021-04-02T19:28:35.572192+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=wordcloudpython.herokuapp.com r
equest_id=28e8c410-53ba-42a2-86ed-dfac2162d53f fwd="160.179.71.151" dyno= connect= service= status=503 bytes= protocol=https

This is my first time using heroku and I'm fairly new to this.

Is your requirements file named correctly? Can you please share your setup.sh file's content?

If all named correctly, there is no reason for it to not to work.

  1. This might sound the same but most of the time the error is because of not including all packages in the requirements.txt file.

This happened to me recently : I needed to use few plots which required me to install Scipy .I didn't even have to import scipy, I just needed to install it as a dependency and so I didn't include it in my requirements file and it broke the deployment. So, I strongly suggest double-checking for such cases once again.

  1. Another alternative to Heroku would be to deploy your application using Streamlit sharing . Learn more about it here . It's really easy to use and doesn't require you to install anything. All you need to do is give your github repository link/name where the source code is.

PS: You need to wait for few hours to get access to streamlit sharing once you have signed up and also keep an eye on your spam folder just in case.

H14 – No web dynos running HTTP 503 means “service currently unavailable.” Note that Heroku router error pages can be customized. These apply only to errors where the app doesn't respond to a request eg 503. Solution: Use the heroku ps:scale command to start the app's web server(s).

you can try this command to force Heroku to spin up a web dyno

$ heroku ps:scale web=1

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM