【发布时间】:2020-05-24 00:51:59
【问题描述】:
所以经过这么多试验,我终于在 heroku 上部署了我的 python 应用程序,现在,该应用程序无法运行。它在日志中返回错误代码“H10”和状态 503。
我的 app.py 很简单
app = Flask(__name__)
@app.route('/')
def hello():
return "Hello world"
if __name__ = '__main__':
app.run(debug = True)
我的要求.txt
AppInst==2.1.5
Flask==0.12.2
Jinja2==2.9.6
MarkupSafe==1.0
Pillow==4.0.0
PyYAML==3.11
Pygments==2.1.3
Werkzeug==0.12.2
appdirs==1.4.3
apptools==4.4.0
argparse==1.4.0
attrs==15.2.0
backports-abc==0.5
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.4.1
bleach==1.5.0
boto==2.40.0
certifi==2017.4.17
chardet==3.0.3
click==6.7
colorama==0.3.9
colorthief==0.2.1
configobj==5.0.6
configparser==3.5.0
cycler==0.10.0
decorator==4.0.9
dlib==19.4.0
docutils==0.13.1
ecdsa==0.13
encore==0.7.0
enstaller==4.8.12
entrypoints==0.2.2
enum34==1.1.6
envisage==4.6.0
esky==0.9.8
feedparser==5.2.1
flake8==3.3.0
futures==3.0.3
gnureadline==6.3.3
gunicorn==19.7.1
hatcher==0.10.4
html5lib==0.999
humanize==0.5.1
idna==2.5
imutils==0.4.3
ipykernel==4.5.2
ipython==4.0.0
ipython-genutils==0.1.0
ipywidgets==6.0.0
itsdangerous==0.24
jedi==0.10.2
jsonify==0.5
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.0.0
jupyter-console==5.1.0
jupyter-core==4.3.0
keyring==10.3.3
lxml==3.8.0
matplotlib==2.0.2
mccabe==0.6.1
memory-profiler==0.43
mistune==0.7.4
mpmath==0.19
nbconvert==5.2.1
nbformat==4.3.0
nose==1.3.7
notebook==4.4.1
numpy==1.12.1
okonomiyaki==0.16.10
olefile==0.44
opencv-python==3.2.0.7
packaging==16.8
pandas==0.20.2
pandocfilters==1.4.1
path.py==10.3.1
pathlib2==2.2.1
pbr==3.0.1
pep8==1.7.0
pexpect==4.2.1
pickleshare==0.7.4
pip==9.0.1
plotly==2.0.9
ply==3.10
prompt-toolkit==1.0.13
psutil==5.2.2
psycopg2==2.7.1
ptyprocess==0.5.1
pyasn1==0.2.3
pycodestyle==2.3.1
pycrypto==2.6.1
pyface==5.1.0
pyflakes==1.5.0
pyglet==1.1.4
pymongo==3.4.0
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
pyzmq==16.0.2
qtconsole==4.3.0
requests==2.17.3
rsa==3.4.2
scipy==0.19.0
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.10.0
stevedore==1.23.0
sympy==1.0
tabulate==0.7.7
terminado==0.6
testpath==0.3.1
tornado==4.5.1
traitlets==4.3.2
traits==4.6.0
traits-enaml==0.2.1
traitsui==5.1.0
tzlocal==1.4
urllib3==1.21.1
virtualenv==15.1.0
wcwidth==0.1.7
cmake==0.7.1
我的过程文件
web: gunicorn malicha:app --log-file=-
构建包
https://github.com/J-A-M-E-5/heroku14-buildpack-python-opencv-dlib.git
【问题讨论】:
-
好的。你的 Procfile 是什么?你有 requirements.txt 文件吗?
-
malicha是什么,该名称与您的 app.py 文件不匹配。所以我猜你的Procfile将是web: gunicorn app:app --log-file=- -
Malicha 是应用的名称
-
我猜你没有关注 Flask 大型项目解决方案,所以我假设 malicha 是你的项目文件夹,在这种情况下,在所有 app.py 和 Procfile 中尝试我的上述解决方案。
-
请问如何将应用名称“malicha”与app.py文件匹配