<i id='Nw9M7'><tr id='Nw9M7'><dt id='Nw9M7'><q id='Nw9M7'><span id='Nw9M7'><b id='Nw9M7'><form id='Nw9M7'><ins id='Nw9M7'></ins><ul id='Nw9M7'></ul><sub id='Nw9M7'></sub></form><legend id='Nw9M7'></legend><bdo id='Nw9M7'><pre id='Nw9M7'><center id='Nw9M7'></center></pre></bdo></b><th id='Nw9M7'></th></span></q></dt></tr></i><div id='Nw9M7'><tfoot id='Nw9M7'></tfoot><dl id='Nw9M7'><fieldset id='Nw9M7'></fieldset></dl></div>
    1. <tfoot id='Nw9M7'></tfoot>
    2. <small id='Nw9M7'></small><noframes id='Nw9M7'>

      • <bdo id='Nw9M7'></bdo><ul id='Nw9M7'></ul>

        <legend id='Nw9M7'><style id='Nw9M7'><dir id='Nw9M7'><q id='Nw9M7'></q></dir></style></legend>

        如何在 Heroku 上安装 discord.py-rewrite 依赖项以进行

        时间:2023-09-09
          <tbody id='dykZB'></tbody>

        • <bdo id='dykZB'></bdo><ul id='dykZB'></ul>
        • <small id='dykZB'></small><noframes id='dykZB'>

            1. <legend id='dykZB'><style id='dykZB'><dir id='dykZB'><q id='dykZB'></q></dir></style></legend>
                <tfoot id='dykZB'></tfoot>
                  <i id='dykZB'><tr id='dykZB'><dt id='dykZB'><q id='dykZB'><span id='dykZB'><b id='dykZB'><form id='dykZB'><ins id='dykZB'></ins><ul id='dykZB'></ul><sub id='dykZB'></sub></form><legend id='dykZB'></legend><bdo id='dykZB'><pre id='dykZB'><center id='dykZB'></center></pre></bdo></b><th id='dykZB'></th></span></q></dt></tr></i><div id='dykZB'><tfoot id='dykZB'></tfoot><dl id='dykZB'><fieldset id='dykZB'></fieldset></dl></div>
                1. 本文介绍了如何在 Heroku 上安装 discord.py-rewrite 依赖项以进行 Discord 机器人托管?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试使用我的 GitHub 主分支在 Heroku 上部署我的 discord.py 机器人,但由于 git 错误而无法执行:找不到标签或分支重写",假设提交.我需要做什么才能成功安装重写"依赖项?

                  I'm trying to deploy my discord.py bot on Heroku using my GitHub master branch, but have been unable to do because of a git error: Could not find a tag or branch 'rewrite', assuming commit. What do I need to do to successfully install the 'rewrite' dependency?

                  我目前正在使用文件requirements.txt"、runtime.txt"、Procfile"和Aptfile".我在 requirements.txt 文件中尝试了几种依赖项组合,包括:

                  I am currently using the files "requirements.txt", "runtime.txt", "Procfile" and "Aptfile". I've tried several combinations of dependencies in my requirements.txt file, including:

                  • git+https://github.com/Rapptz/discord.py@rewrite
                  • git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py
                  • discord.py
                  • dnspython==1.16.0
                  • PyNaCl==1.3.0

                  这些是 Heroku 所需文件的内容:

                  These are the contents of my files needed for Heroku:

                  requirements.txt:git+https://github.com/Rapptz/discord.py@rewrite

                  requirements.txt: git+https://github.com/Rapptz/discord.py@rewrite

                  runtime.txt:python-3.6.8

                  runtime.txt: python-3.6.8

                  Procfile: worker: python bot.py

                  Aptfile: git

                  当使用任何东西 git+https://github.com/Rapptz/discord.py@rewrite 尝试部署机器人时,herokulogs --tail 会显示错误:

                  When using anything but git+https://github.com/Rapptz/discord.py@rewrite in attempts to get the bot deployed, heroku logs --tail will display the error:

                  self.custom_red = discord.Colour.from_rgb(255, 0, 0)  # ff0000
                  AttributeError: type object 'Colour' has no attribute 'from_rgb' 
                  

                  我要强调的重要一点是 PyCharm 不会在本地抛出这个错误,即使已经测试了那部分代码.这就是我得出的结论,即我在安装对 Heroku 的重写"依赖项时遇到问题.

                  The important thing I want to emphasize is that PyCharm does not throw this error locally, even having tested that part of the code. This is how I came to the conclusion that that I am having issues with installing the 'rewrite' dependency on Heroku.

                  这是 Heroku 上的完整错误日志:

                  This here is the full error log on Heroku:

                  -----> Uninstalling stale dependencies
                         Uninstalling discord.py-0.16.12:
                           Successfully uninstalled discord.py-0.16.12
                  -----> Installing requirements with pip
                         Collecting git+https://github.com/Rapptz/discord.py@rewrite (from -r /tmp/build_9642c6bfbfd8e0f0ea526230740f0bd1/requirements.txt (line 1))
                           Cloning https://github.com/Rapptz/discord.py (to rewrite) to /tmp/pip-41cdp1qz-build
                           Could not find a tag or branch 'rewrite', assuming commit.
                         error: pathspec 'rewrite' did not match any file(s) known to git.
                         Command "git checkout -q rewrite" failed with error code 1 in /tmp/pip-41cdp1qz-build
                   !     Push rejected, failed to compile Python app.
                   !     Push failed 
                  

                  话虽如此,是否有任何建议可以帮助我通过成功安装重写"依赖项来克服此错误,从而使我的机器人在 Heroku 上正常运行?

                  That being said, are there any suggestions to help me get past this error by successfully installing the "rewrite" dependency and thus, have my bot functional on Heroku?

                  如果我可以提供任何其他信息,请告诉我.非常感谢任何帮助.

                  Please let me know if I can provide any additional information. Any help is much appreciated.

                  推荐答案

                  rewrite分支已经合并,不再存在.使用 discord.py 的版本可从 PyPI 获得,这是目前最新的.

                  The rewrite branch has been merged, and no longer exists. Use the version of discord.py available from PyPI, that's currently the latest.

                  这篇关于如何在 Heroku 上安装 discord.py-rewrite 依赖项以进行 Discord 机器人托管?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  <tfoot id='IUK6Q'></tfoot>

                    <bdo id='IUK6Q'></bdo><ul id='IUK6Q'></ul>
                  • <i id='IUK6Q'><tr id='IUK6Q'><dt id='IUK6Q'><q id='IUK6Q'><span id='IUK6Q'><b id='IUK6Q'><form id='IUK6Q'><ins id='IUK6Q'></ins><ul id='IUK6Q'></ul><sub id='IUK6Q'></sub></form><legend id='IUK6Q'></legend><bdo id='IUK6Q'><pre id='IUK6Q'><center id='IUK6Q'></center></pre></bdo></b><th id='IUK6Q'></th></span></q></dt></tr></i><div id='IUK6Q'><tfoot id='IUK6Q'></tfoot><dl id='IUK6Q'><fieldset id='IUK6Q'></fieldset></dl></div>

                        <tbody id='IUK6Q'></tbody>

                          <small id='IUK6Q'></small><noframes id='IUK6Q'>

                          <legend id='IUK6Q'><style id='IUK6Q'><dir id='IUK6Q'><q id='IUK6Q'></q></dir></style></legend>