我的Discord PY僵尸程序不断崩溃,崩溃后它显示了以下内容:
2019-11-19T10:25:23.845044+00:00 app[worker.1]: Traceback (most recent call last):
2019-11-19T10:25:23.845074+00:00 app[worker.1]: File "app.py", line 336, in <module>
2019-11-19T10:25:23.846038+00:00 app[worker.1]: client.run(os.getenv('BOT_TOKEN'))
2019-11-19T10:25:23.846045+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 598, in run
2019-11-19T10:25:23.846346+00:00 app[worker.1]: return future.result()
2019-11-19T10:25:23.846353+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 579, in runner
2019-11-19T10:25:23.846614+00:00 app[worker.1]: await self.start(*args, **kwargs)
2019-11-19T10:25:23.846621+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 543, in start
2019-11-19T10:25:23.846874+00:00 app[worker.1]: await self.connect(reconnect=reconnect)
2019-11-19T10:25:23.846880+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 457, in connect
2019-11-19T10:25:23.847138+00:00 app[worker.1]: await self._connect()
2019-11-19T10:25:23.847143+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/client.py", line 421, in _connect
2019-11-19T10:25:23.847401+00:00 app[worker.1]: await self.ws.poll_event()
2019-11-19T10:25:23.847405+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/gateway.py", line 469, in poll_event
2019-11-19T10:25:23.847645+00:00 app[worker.1]: await self.received_message(msg)
2019-11-19T10:25:23.847647+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/gateway.py", line 423, in received_message
2019-11-19T10:25:23.847877+00:00 app[worker.1]: func(data)
2019-11-19T10:25:23.847885+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.7/site-packages/discord/state.py", line 407, in parse_message_reaction_add
2019-11-19T10:25:23.848118+00:00 app[worker.1]: emoji = PartialEmoji.with_state(self, animated=emoji_data['animated'], id=emoji_id, name=emoji_data['name'])
2019-11-19T10:25:23.848173+00:00 app[worker.1]: KeyError: 'animated'
2019-11-19T10:25:24.078351+00:00 heroku[worker.1]: State changed from up to crashed
2019-11-19T10:25:24.082198+00:00 heroku[worker.1]: State changed from crashed to starting
2019-11-19T10:25:24.060446+00:00 heroku[worker.1]: Process exited with status 1
2019-11-19T10:25:27.651125+00:00 heroku[worker.1]: Starting process with command `python3 app.py`
2019-11-19T10:25:28.354322+00:00 heroku[worker.1]: State changed from starting to up
当有人在其消息上添加反应时,僵尸程序总是崩溃
答案 0 :(得分:1)
此问题似乎已在今天发布的discord.py 1.2.5中修复。
使用pip install --upgrade discord.py
更新到最新版本应该可以解决此问题。