Heroku 推送失敗

斯戴斯戴特

我正在嘗試使用以下命令將某些東西推向 heroku:“git push heroku HEAD:main”

我在 CMD 中得到的錯誤是:

    "! [remote rejected] HEAD -> main (pre-receive hook declined)
      error: failed to push some refs to 'https://git.heroku.com/discordbotonline247.git'"
    
     And if i check Heroku logs i find this:
    -----> Building on the Heroku-20 stack
    
    -----> Using buildpack: heroku/python
    
    -----> Python app detected
    
    -----> No Python version was specified. Using the buildpack default: python-3.9.9
    
           To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
    
    -----> Installing python-3.9.9
    
    -----> Installing pip 21.3.1, setuptools 57.5.0 and wheel 0.37.0
    
    -----> Installing SQLite3
    
    -----> Installing requirements with pip
    
           Collecting git+https://github.com/Rapptz/discord.py@rewrite (from -r /tmp/build_3181f09c/requirements.txt (line 1))
    
             Cloning https://github.com/Rapptz/discord.py (to revision rewrite) to /tmp/pip-req-build-wpl2aq36
    
             Running command git clone --filter=blob:none -q https://github.com/Rapptz/discord.py /tmp/pip-req-build-wpl2aq36
    
             WARNING: Did not find branch or tag 'rewrite', assuming revision or ref.
    
             Running command git checkout -q rewrite
    
             error: pathspec 'rewrite' did not match any file(s) known to git
    
           WARNING: Discarding git+https://github.com/Rapptz/discord.py@rewrite. Command errored out with exit status 1: git checkout -q rewrite Check the logs for full command output.
    
           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

在我的 Procfile 我有:

"worker: python Discord_Bot.py

在我的 requirements.txt 我有:

"git+https://github.com/Rapptz/discord.py@rewrite
 PyNaCl==1.3.0
 pandas
 dnspython==1.16.0
 async-timeout==3.0.1"

請幫忙!

阿迪亞·托馬爾

您需要刪除requirements.txt 文件中的引號以及Github 鏈接中的@rewrite。但是,不要刪除@rewrite,只需指定不和諧版本即可。將您的 requirements.txt 文件替換為以下內容:

discord.py==1.6.0
PyNaCl==1.3.0
pandas
dnspython==1.16.0
async-timeout==3.0.1

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章