1
我一直在使用燒瓶框架,我在部署的Heroku一樣,但我成功構建後獲得應用程序錯誤開發Python應用程序。我的應用程序在本地主機上運行。什麼是問題,我錯了什麼,以及如何解決問題。爲什麼在Heroku上獲得建立後,我的應用程序沒有運行成功
Procfile內容:
網站:蟒蛇瓶/ app.py,我也嘗試網絡:蟒蛇app.py,但沒有奏效。
Requirments.txt:
燒瓶== 0.12
更具體我不使用gunicorn。
日誌文件細節的Heroku:
Python app detected
-----> Installing python-2.7.13
$ pip install -r requirements.txt
Collecting flask==0.12 (from -r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading Flask-0.12-py2.py3-none-any.whl (82kB)
Collecting itsdangerous>=0.21 (from flask==0.12->-r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading itsdangerous-0.24.tar.gz (46kB)
Collecting Werkzeug>=0.7 (from flask==0.12->-r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading Werkzeug-0.12.1-py2.py3-none-any.whl (312kB)
Collecting Jinja2>=2.4 (from flask==0.12->-r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading Jinja2-2.9.5-py2.py3-none-any.whl (340kB)
Collecting click>=2.0 (from flask==0.12->-r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading click-6.7-py2.py3-none-any.whl (71kB)
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->flask==0.12->-r /tmp/build_ae4a1daf2328eb128abf7b576e0858c1/requirements.txt (line 1))
Downloading MarkupSafe-1.0.tar.gz
Installing collected packages: itsdangerous, Werkzeug, MarkupSafe, Jinja2, click, flask
Running setup.py install for itsdangerous: started
Running setup.py install for itsdangerous: finished with status 'done'
Running setup.py install for MarkupSafe: started
Running setup.py install for MarkupSafe: finished with status 'done'
Successfully installed Jinja2-2.9.5 MarkupSafe-1.0 Werkzeug-0.12.1 click-6.7 flask-0.12 itsdangerous-0.24
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 37.7M
-----> Launching...
Released v3
https://guarded-tundra-18526.herokuapp.com/ deployed to Heroku
日誌文件沒有顯示任何錯誤。那爲什麼我無法運行我的應用程序。
當你嘗試運行你的應用程序時發生了什麼?你有一些錯誤嗎?你能發佈錯誤日誌嗎? –
我已經發布了Heroku的LogFie,並且它顯示沒有錯誤,即使應用程序在啓動之後發生應用程序錯誤。 –
在另一個終端運行'heroku logs --tail'來查看Procfile命令是否在啓動時遇到任何錯誤。 – brennan