【问题标题】:Discord Rewrite Bot not working after deploying on Heroku在 Heroku 上部署后,Discord Rewrite Bot 无法正常工作
【发布时间】:2021-04-23 01:59:05
【问题描述】:

到目前为止,它在 heroku 和本地都运行良好。现在它只能在本地工作,但在部署到 heroku 后就不能工作了。这是 Heroku 的日志:

2021-04-22T17:41:34.000000+00:00 app[api]: Build succeeded
2021-04-22T17:41:37.853181+00:00 heroku[worker.1]: Starting process with command `python3.9.4 dbot.py`
2021-04-22T17:41:38.485331+00:00 heroku[worker.1]: State changed from starting to up
2021-04-22T17:41:39.356992+00:00 app[worker.1]: bash: python3.9.4: command not found
2021-04-22T17:41:39.416346+00:00 heroku[worker.1]: Process exited with status 127
2021-04-22T17:41:39.485205+00:00 heroku[worker.1]: State changed from up to crashed

我的 request.txt 文件包含这些依赖项:

git+https://github.com/Rapptz/discord.py
youtube_dl==2020.03.08
pynacl == 1.3.0
colorlog == 4.1.0

我的 procfile 中有这个:

worker: python3.9.4 dbot.py

据我所知,我认为这与我最近更新到 3.9.4 的 python 版本有关

【问题讨论】:

    标签: python heroku discord.py


    【解决方案1】:

    而不是将python的版本放入Procfile,简单地放:

    worker: python dbot.py
    

    如果您想为您的机器人指定一个 python 版本,请创建一个具有以下格式的 runtime.txt 文件

    python-3.9.4
    

    【讨论】:

      猜你喜欢
      • 2020-11-24
      • 2020-08-24
      • 2020-10-11
      • 1970-01-01
      • 1970-01-01
      • 2018-03-09
      • 2013-02-20
      • 2020-12-21
      • 2019-07-25
      相关资源
      最近更新 更多