【发布时间】:2021-11-26 17:08:46
【问题描述】:
您好,我刚刚在 heroku 上托管了我的机器人它在 vscode 上正常工作,但是当我在 heroku 上启动它时,我遇到了这个问题:
2021-10-06T13:46:25.731963+00:00 heroku[worker.1]: Starting process with command `python crypto_bot.py`
2021-10-06T13:46:26.739615+00:00 heroku[worker.1]: State changed from starting to up
2021-10-06T13:46:27.351804+00:00 app[worker.1]: Traceback (most recent call last):
2021-10-06T13:46:27.351822+00:00 app[worker.1]: File "/app/crypto_bot.py", line 4, in <module>
2021-10-06T13:46:27.351913+00:00 app[worker.1]:
from crypto_functions import get_crypto_price,get_crypto_rank,get_price_with_symbol,get_performance_24,get_performance_7d,get_everything_about_the_crypto,get_crypto_info,get_crypto_reddit,get_crypto_price_in_numbers_only
2021-10-06T13:46:27.351914+00:00 app[worker.1]: File "/app/crypto_functions.py", line 19, in <module>
2021-10-06T13:46:27.351996+00:00 app[worker.1]:
json_file=json.loads(response.text)['data']
2021-10-06T13:46:27.351996+00:00 app[worker.1]: KeyError: 'data'
2021-10-06T13:46:27.523411+00:00 heroku[worker.1]: Process exited with
status 1
2021-10-06T13:46:27.574770+00:00 heroku[worker.1]: State changed from up to crashed
【问题讨论】:
标签: python python-3.x heroku discord.py hosting