简体   繁体   English

Streamlit Python 应用程序已成功部署到 Heroku,但出现应用程序错误

[英]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.如果所有名称都正确,则没有理由不工作。

  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.这听起来可能相同,但大多数时候错误是因为没有在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.因此,我强烈建议再次仔细检查此类情况。

  1. Another alternative to Heroku would be to deploy your application using Streamlit sharing . Heroku 的另一种替代方法是使用Streamlit 共享部署您的应用程序。 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.您需要做的就是在源代码所在的位置提供您的github存储库链接/名称。

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.

相关问题 我在 Heroku 上成功部署了我的 Web 应用程序,但显示应用程序错误 - I successfully deployed my web app on Heroku but shows Application Error Heroku 应用部署成功但应用报错 - Heroku app deployed successfully but Application Error Heroku 应用程序成功部署,但打开应用程序时收到应用程序错误 - Heroku app successfully deployed, but receiving application error when opening app 应用程序(Python Django,PostgreSql)已成功部署在Heroku上,但是尝试打开时出现错误 - App (Python Django, PostgreSql) is deployed successfully on Heroku, but I'm getting error when trying to open 成功部署 Django 到 Heroku 但收到应用程序错误 - Successfully deployed Django to Heroku but received application error Flask 应用程序部署成功 - 应用程序错误 - Flask app deployed successfully - Application Error Heroku上的Django应用程序,已成功部署但无法提供服务 - Django app on Heroku, deployed successfully but could not be served Heroku 应用程序成功部署,但在加载站点时收到应用程序错误。 但我似乎可以找到一个错误 - Heroku app successfully deploying, but receiving application error when loading site. But I can seem to find an error Heroku 上的 OpenCV 错误,但模型成功部署 - OpenCV error on Heroku but model successfully deployed Heroku 应用成功部署,但加载站点时收到应用程序错误 - Heroku app successfully deploying, but receiving application error when loading site
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM