所以我使用 discord.py/rewrite 制作了一个机器人,并希望将它托管在 heroku 上。我一直在关注this tutorial
我观看了整个视频并且一切正常,但是当我运行“git push heroku master”时,我得到以下输出:
C:\Users\Foobar\Documents\VsProjects\discord_bot>git push heroku master
Enumerating objects: 22, done.
Counting objects: 100% (22/22), done.
Delta compression using up to 16 threads
Compressing objects: 100% (21/21), done.
Writing objects: 100% (22/22), 523.65 KiB | 34.91 MiB/s, done.
Total 22 (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: -----> Python app detected
remote: -----> Installing python-3.6.13
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote: Collecting git+https://github.com/Rapptz/discord.py@rewrite (from -r
/tmp/build_19ca20f6/requirements.txt (line 1))
remote: Cloning https://github.com/Rapptz/discord.py (to revision rewrite) to /tmp/pip-req-
build-bgvpdhq0
remote: Running command git clone -q https://github.com/Rapptz/discord.py /tmp/pip-req-
build-bgvpdhq0
remote: WARNING: Did not find branch or tag 'rewrite', assuming revision or ref.
remote: Running command git checkout -q rewrite
remote: error: pathspec 'rewrite' did not match any file(s) known to git
remote: ERROR: Command errored out with exit status 1: git checkout -q rewrite Check the logs
for full command output.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to wkurw-bot.
remote:
To https://git.heroku.com/wkurw-bot.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/wkurw-bot.git'
包括Procfile和requirements.txt的内容
简介:
worker: python bot.py
requirements.txt:
git+https://github.com/Rapptz/discord.py@rewrite
dnspython==1.16.0
PyNaCl==1.3.0
async-timeout==3.0.1
aiofiles
asyncio
random
希望你能帮我解决这个问题。还包括我运行的所有命令: