cmd显示Git push heroku master->! [远程拒绝] master-> master(推送钩子被拒绝),同时推送一个python webscraping项目

时间:2020-06-08 20:29:39

标签: python git heroku scrapyd

因此,我尝试使用scrapyd将python网络抓取项目推到heroku,我下载了heroku cli并在平台上注册了免费帐户。 我也配置了git。 在将代码部署到heroku时,我进行了以下更改:

我在我编写的项目的根目录中创建了Procfile:

web: scrapyd

我使用以下命令在项目的根目录中创建了requirements.txt:

pip freeze > requirements.txt

在命令行中。

我还使用以下代码创建了runtime.txt:

python-3.7.7

和.gitignore文件:

__pycache__/

.vscode/
build/
dbs/
eggs/
project.egg-info/

*.json
*.csv

无论如何,当我尝试:

git push heroku master

运行:

之后
 heroku git:remote -a appname

命令行(和构建日志)显示以下错误:

-----> Python app detected
 !     Requested runtime () is not available for this stack (heroku-18).
 !     Aborting.  More info: https://devcenter.heroku.com/articles/python-support
 !     Push rejected, failed to compile Python app.
 !     Push failed

我尝试多次更改runtime.txt中指定的python版本,甚至尝试删除该文件,然后完全运行部署,这是行不通的。

0 个答案:

没有答案