繁体   English   中英

Heroku 找不到应用程序错误

[英]Heroku failed to find application app error

尝试在 Heroku 上部署我的 dash plotly 仪表板,但收到此错误:

2020-02-12T20:06:28.207580+00:00 heroku[web.1]: Starting process with command `gunicorn app:server`
2020-02-12T20:06:34.455328+00:00 heroku[web.1]: State changed from starting to up
2020-02-12T20:07:03.644528+00:00 app[web.1]: WORKER TIMEOUT (pid:10)
2020-02-12T20:07:04.647635+00:00 app[web.1]: WORKER TIMEOUT (pid:11)
2020-02-12T20:07:15.625829+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/" host=kalinaxchallenge.herokuapp.com request_id=f2e2ef3e-c454-45fc-a5f0-f3e4fa1f59e1 fwd="197.221.254.77" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0 protocol=https
2020-02-12T20:07:22.939065+00:00 app[web.1]: Failed to find application: 'app'
2020-02-12T20:07:28.354927+00:00 app[web.1]: Failed to find application: 'app'
2020-02-12T20:07:29.073920+00:00 heroku[web.1]: State changed from up to crashed
2020-02-12T20:07:28.813680+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/favicon.ico" host=kalinaxchallenge.herokuapp.com request_id=7c1977fe-5495-4327-990f-68a433ed2269 fwd="197.221.254.77" dyno=web.1 connect=1ms service=11173ms status=503 bytes=0 protocol=https
2020-02-12T20:07:29.059525+00:00 heroku[web.1]: Process exited with status 4

我的档案:

web: gunicorn app:server 

和我的要求.txt

dash_core_components==1.5.1
dash==1.6.1
dash_html_components==1.0.2
pandas==0.25.2
plotly==4.2.1
gunicorn==19.0.0
numpy==1.17.4

和我的 app.py

if __name__ == '__main__':
        app.run_server(debug=True)

该应用程序在本地完美运行

似乎是一个奇怪的错误信息,至少对我来说,因为这是我项目的结构

Procfile
app.json
app.py
dataset1
dataset2
requirements.txt

我不知道为什么它就在那里时找不到应用程序

注意:我没有名为 app 的文件夹并删除了 app.json

我通过将此行添加到我的 app.py 解决了这个问题

server = app.server

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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