[英]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所以我有一个 Streamlit Python 应用程序我想在 heroku 上部署,部署成功,但是当我打开应用程序时它给了我一个应用程序错误
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:这是我的 Procfile 文件:
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.这是我第一次使用 heroku,我对此很陌生。
Is your requirements file named correctly?您的需求文件是否正确命名? Can you please share your setup.sh file's content?
你能分享你的 setup.sh 文件的内容吗?
If all named correctly, there is no reason for it to not to work.如果所有名称都正确,则没有理由不工作。
requirements.txt
file.requirements.txt
文件中包含所有包。 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.这最近发生在我身上:我需要使用一些需要安装
Scipy
的地块。我什至不必导入 scipy,我只需要将它作为依赖项安装,所以我没有将它包含在我的需求文件中它破坏了部署。 So, I strongly suggest double-checking for such cases once again.因此,我强烈建议再次仔细检查此类情况。
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. PS:注册后,您需要等待几个小时才能访问 streamlit 共享,并留意您的垃圾邮件文件夹以防万一。
H14 – No web dynos running HTTP 503 means “service currently unavailable.” H14 – No web dynos running HTTP 503 表示“服务当前不可用”。 Note that Heroku router error pages can be customized.
请注意,可以自定义 Heroku 路由器错误页面。 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).
这些仅适用于应用程序不响应请求的错误,例如 503。 解决方案:使用 heroku ps:scale 命令启动应用程序的 web 服务器。
you can try this command to force Heroku to spin up a web dyno您可以尝试使用此命令强制 Heroku 启动 web 测功机
$ heroku ps:scale web=1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.