【发布时间】:2021-12-15 14:51:07
【问题描述】:
我想在 heroku 上托管我的 discord 机器人
i have followed and youtube video till here
但我不知道如何解决这个错误
完整
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 2.68 KiB | 2.68 MiB/s, done.
Total 6 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Using buildpack: heroku/python
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 0f11b1acbc6bdb39c6ea1fc83fa514db48551dfe
remote: !
remote: ! We have detected that you have triggered a build from source code with version 0f11b1acbc6bdb39c6ea1fc83fa514db48551dfe
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to bruh-bot-7869.
remote:
To https://git.heroku.com/bruh-bot-7869.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/bruh-bot-7869.git'
我在文件夹中有 2 个文件:-
main.py
rr.json
两者都很重要
在 Procfile 中:-
worker: python main.py
和 requirements.txt :-
git+https://github.com/Rapptz/discord.py@rewrite
我不知道该怎么办 请帮忙!
【问题讨论】:
-
我用谷歌搜索了很多次,但对我没有任何帮助:(
-
您的文件夹中有 requirements.txt 吗?
-
是的,看看我所说的问题,我的 requiremnets.txt 中有什么
-
你使用了 pip freeze > requirements.txt 吗? procfile 和 requirements 内容都很奇怪
-
以我的项目为例,我的 Procfile 是: web: gunicorn
.wsgi --log-file - 要求是我所有导入的列表
标签: python heroku discord.py