python - 远程:-----> 应用程序与 buildpack 不兼容:托管不和谐机器人时出现 heroku 错误
问题描述
我想在 heroku 上托管我的不和谐机器人
但我不知道如何解决这个错误
满的
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 个文件:-
主文件
rr.json
两者都很重要
并在 Procfile 中:-
worker: python main.py
和 requirements.txt :-
git+https://github.com/Rapptz/discord.py@rewrite
我不知道该怎么做请帮忙!
解决方案
我不知道是什么问题,但我将文件上传到 github 并将 heroku github 连接到 heroku 并部署
我在 requirements.txt 中做错了 100%
当我使用 pip3 freeze (评论中的 Marrows 告诉我)并将所有内容添加到 requirements.txt 并上传到 github 时。
之后部署机器人,一切正常。谢谢 :)
推荐阅读
- c# - AutoMapper 映射到 Enum 默认值,而不是在 null 时跳过
- javascript - Zapier Javascript: Unexpected token ] - 在 IDE、Repl.it 和 Node v6.3.1 中工作
- javascript - 从对象内的所有对象中按键移除元素
- php - 使用来自一个视图的输入将结果打印到另一个视图
- c# - C#比较多种类型
- raspberry-pi3 - scp 冻结并创建空文件
- php - Laravel 在雄辩的保存上试运行
- amazon-web-services - 使用 aws java sdk 触发 lambda 函数的 SQS 的返回值
- python - Cython 给出“不必要的”警告
- apache-spark - 前向填充多列可重用功能代码