heroku -找不到该进程类型(web)-(进程文件,gunicorn已安装,heroku/python已添加,已尝试提交(空-提交)&推送)[已关闭]

u3r8eeie  于 2022-11-30  发布在  Python
关注(0)|答案(2)|浏览(142)

**已关闭。**此问题为not reproducible or was caused by typos。目前不接受答案。

这个问题是由一个打字错误或一个无法再重现的问题引起的。虽然类似的问题在这里可能是on-topic,但这个问题的解决方式不太可能帮助未来的读者。
9天前关闭。
Improve this question
heroku - Couldn't find that process type (web)按照developer6811的说明进行了操作,但仍然出现错误:

  1. Scaling dynos... !
  2. Couldn't find that process type (web).

在做了

  1. $ heroku ps:scale web=1

一些说明,显示我的条件:

  1. $ pip install gunicorn
  2. Requirement already satisfied: gunicorn in c:\users\adolp\anaconda3\lib\site-packages (20.1.0)
  3. Requirement already satisfied: setuptools>=3.0 in c:\users\adolp\anaconda3\lib\site-packages (from gunicorn) (52.0.0.post20210125)
  4. $git commit --allow-empty -m "Adjust buildpacks on Heroku"
  5. [main 92d6f48] Adjust buildpacks on Heroku
  6. $git push heroku master
  7. Everything up-to-date
  8. $git push heroku main
  9. Everything up-to-date
  10. $heroku buildpacks:add heroku/python
  11. » Error: The buildpack heroku/python is already set on your app.

app.py:

  1. from flask import Flask
  2. app = Flask(__name__)
  3. @app.route("/")#decorator
  4. def home():
  5. return "Hello Flask 2"
  6. @app.route("/test")#decorator
  7. def test():
  8. return "This is Test"
  9. if __name__=="__main__":
  10. app.run()

过程文件:

  1. web: gunicorn app:app

Requirements.txt:

  1. Flask
  2. gunicorn

runtime.txt:

  1. python-3.9.11

project folder image

w6lpcovy

w6lpcovy1#

尝试将Procfile放在根目录中:

  1. ---__init__.py
  2. --- config.py
  3. --- wsgi.py
  4. --- models.py
  5. --- Procfile

然后道:

  1. git add .
  2. git commit -m 'profile added'
  3. git push heroku main

我会将更改添加到heroku中,这样应该可以工作

osh3o9ms

osh3o9ms2#

Chris在注解中提供了答案:
你的Procfile真的叫Procfile吗?不是Procfile.txt或者procfile或者ProcFile什么的吗?它在你项目的根目录下吗?它是UTF-8编码的吗?
...
您的屏幕截图显示了一个名为Procflie的文件。请修改名称,例如使用git mv Procflie Procfile,提交并重新部署。

相关问题