【问题标题】:Hosting discord bot through Heroku - deploy error通过 Heroku 托管不和谐机器人 - 部署错误
【发布时间】:2021-10-25 09:30:25
【问题描述】:

我正在尝试通过 heroku 托管我的 discord 机器人。我正在用python编码。但是从 GitHub 部署时出现以下错误:

-----> Using buildpack: heroku/python
-----> Python app detected
-----> No Python version was specified. Using the buildpack default: python-3.9.6
       To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
-----> Installing python-3.9.6
-----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting git+https://github.com/Rapptz/discord.py@rewrite (from -r /tmp/build_25682582/requirements.txt (line 1))
         Cloning https://github.com/Rapptz/discord.py (to revision rewrite) to /tmp/pip-req-build-hv03qzyg
         WARNING: Did not find branch or tag 'rewrite', assuming revision or ref.
       ERROR: Command errored out with exit status 1: git checkout -q rewrite Check the logs for full command output.
 !     Push rejected, failed to compile Python app.
 !     Push failed

这是我在 heroku 上看到的完整构建日志。 任何人都可以帮忙吗?谢谢

【问题讨论】:

  • 每次我尝试部署它时都会遇到同样的错误。还尝试在命令行中切换到使用 Heroku CLI 方法,但结果相同

标签: python heroku discord discord.py bots


【解决方案1】:

您应该将requirements.txt 中的第一行更改为git+https://github.com/Rapptz/discord.py。因为没有名为“rewrite”的标签或分支。

【讨论】:

    猜你喜欢
    • 2020-07-20
    • 1970-01-01
    • 2021-12-13
    • 1970-01-01
    • 2021-10-29
    • 2019-09-09
    • 2021-12-15
    • 2021-06-03
    • 2020-06-30
    相关资源
    最近更新 更多