简体   繁体   English

Heroku本地失败,没有错误消息

[英]Heroku local failing with no error message

I'm trying to get a flask structure up and running with Heroku following their guide: https://devcenter.heroku.com/articles/getting-started-with-python-o 我正在按照他们的指南尝试构建烧瓶结构并与Heroku一起运行: https : //devcenter.heroku.com/articles/getting-started-with-python-o

but I'm encountering a weird problem, following the guide, I get the following error when running heroku local : 但是我遇到了一个奇怪的问题,按照指南进行操作,在运行heroku local时出现以下错误:

forego | starting web.1 on port 5000
web.1  | Traceback (most recent call last):

with no additional messages. 没有其他消息。 I'm on windows 7 64bit and tried running it from both gitbash and cmd with and without "run as administrator ", but nothing changes. 我在Windows 7 64bit上,尝试从gitbash和cmd都运行有和没有“以管理员身份运行”,但是没有任何变化。

My Procfile looks like this: 我的Procfile看起来像这样:

web: gunicorn main:app --log-file -

folder structure is pretty much the standard: 文件夹结构几乎是标准的:

.git/
static/
venv/
main.py
Procfile

and main.py is: 并且main.py是:

import os
from flask import Flask
app = Flask(__name__)

@app.route('/')
def root():
    return 'hello world'

Now when I tried calling app.run to run flask manually, it worked fine with no problems.. Any idea to what might be causing this? 现在,当我尝试调用app.run手动运行flask时,它运行正常,没有任何问题。

Apparently, this is the behavior if your procfile is blank. 显然,这是您的procfile为空白时的行为。 Check that and reset it if needed. 检查并根据需要将其重置。

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

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