python - Flask、Python 的 H14 Heroku“没有运行 Web 进程”
问题描述
我使用 Python 和 Heroku Web 框架编写了一个小站点。面临应用程序无法运行的问题,但是,当在本地(通过我的终端)运行时,一切正常。日志说以下内容:
2020-05-20T06:19:35.538634+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=reviewssystem.herokuapp.com request_id=00dd8d00-f6b0-471b-bab7-65d065c60025 fwd="109.229.183.36" dyno= connect= service= status=503 bytes= protocol=https
我尝试使用heroku ps:scale web=1
并得到这个:
Scaling dynos... !
▸ Couldn't find that process type (web).
heroku ps
输出:No dynos on ⬢ reviewssystem
档案:web: gunicorn app:app
. 我也尝试过使用web: python app.py
,但没有帮助。
要求.txt:
click==7.1.2
Flask==1.1.2
Flask-SQLAlchemy==2.4.1
gunicorn==20.0.4
itsdangerous==1.1.0
Jinja2==2.11.2
MarkupSafe==1.0
SQLAlchemy==1.3.16
Werkzeug==1.0.1
构建日志:
-----> Python app detected
-----> No change in requirements detected, installing from cache
-----> Installing SQLite3
-----> Installing requirements with pip
-----> Discovering process types
Procfile declares types -> (none)
-----> Compressing...
Done: 47.6M
-----> Launching...
Released v8
https://reviewssystem.herokuapp.com/ deployed to Heroku
那么,我应该怎么做才能修复它?
解决方案
推荐阅读
- c# - Azure Functions 突然找不到入口点错误
- hibernate - 如何将休眠查询映射到 JpaRepository 中的自定义类
- javascript - 使用 swiper js 创建历史时间轴,每年有多张幻灯片
- python - 熊猫计算日期时间之间的持续时间但不考虑特定时间范围
- ios - TypeError:null 不是对象(评估“Chat.addListener”)
- angular - 我想在 angular6 中向 window.open(url) 添加凭据
- vue.js - 如何在 Vue 应用程序中重用数组,声明一次并在多个文件中使用?
- python - 在 Tensorflow 2.2.0 中,我的 model.history.history 在将数据与validation_data 一起拟合后为空
- php - 正则表达式在 URL 中查找语言环境
- php - SQLSTATE [23000]:完整性约束违规:1452 无法添加或更新