Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot crashes whenever it receives an emoji as reaction #2422

Closed
shavitush opened this issue Nov 18, 2019 · 4 comments

Comments

@shavitush
Copy link

@shavitush shavitush commented Nov 18, 2019

Summary

The bot crashes whenever it receives an emoji as reaction.

Reproduction Steps

Simply reacted to it with an 馃憖 emoji in a DM

https://streamable.com/z4jbv

Expected Results

The bot to not crash..?

Actual Results

From what it seems, the traceback doesn't really show anything from my code so it's likely from the library itself

Traceback (most recent call last):
  File "main.py", line 363, in <module>
    client.run(config.get("discord", "token"))
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/client.py", line 598, in run
    return future.result()
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/client.py", line 579, in runner
    await self.start(*args, **kwargs)
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/client.py", line 543, in start
    await self.connect(reconnect=reconnect)
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/client.py", line 457, in connect
    await self._connect()
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/client.py", line 421, in _connect
    await self.ws.poll_event()
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/gateway.py", line 469, in poll_event
    await self.received_message(msg)
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/gateway.py", line 423, in received_message
    func(data)
  File "/home/shavit/.local/lib/python3.7/site-packages/discord/state.py", line 435, in parse_message_reaction_remove
    emoji = PartialEmoji.with_state(self, animated=emoji_data['animated'], id=emoji_id, name=emoji_data['name'])
KeyError: 'animated'

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

System Information

shavit@windia:~/discord$ python3 -m discord -v
- Python v3.7.3-final
- discord.py v1.2.4-final
- aiohttp v3.5.4
- websockets v6.0
- system info: Linux 5.0.0-25-generic #26-Ubuntu SMP Thu Aug 1 12:04:58 UTC 2019
@Harmon758

This comment has been minimized.

Copy link
Contributor

@Harmon758 Harmon758 commented Nov 19, 2019

This should now be fixed with v1.2.5.
In the future, please make sure you're using the latest development version when reporting issues.

@EndenDragon EndenDragon mentioned this issue Nov 19, 2019
3 of 3 tasks complete
@Rapptz Rapptz pinned this issue Nov 19, 2019
@Rapptz Rapptz mentioned this issue Nov 19, 2019
3 of 3 tasks complete
Repository owner deleted a comment from TheRockettek Nov 19, 2019
Repository owner deleted a comment from samclane Nov 19, 2019
vicelversa added a commit to phylonyus/doot-doot-wow that referenced this issue Nov 20, 2019
@vr6syncro

This comment has been minimized.

Copy link

@vr6syncro vr6syncro commented Nov 20, 2019

Hey, updated my discord.py but bot still crash:

`Traceback (most recent call last):
File "voicecreate.py", line 39, in
bot.run(DISCORD_TOKEN)
File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 598, in run
return future.result()
File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 579, in runner
await self.start(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 543, in start
await self.connect(reconnect=reconnect)
File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 457, in connect
await self._connect()
File "/usr/local/lib/python3.7/site-packages/discord/client.py", line 421, in _connect
await self.ws.poll_event()
File "/usr/local/lib/python3.7/site-packages/discord/gateway.py", line 469, in poll_event
await self.received_message(msg)
File "/usr/local/lib/python3.7/site-packages/discord/gateway.py", line 423, in received_message
func(data)
File "/usr/local/lib/python3.7/site-packages/discord/state.py", line 407, in parse_message_reaction_add
emoji = PartialEmoji.with_state(self, animated=emoji_data['animated'], id=emoji_id, name=emoji_data['name'])
KeyError: 'animated'
root@Squad:/home/alex/VoiceCreateBot# python3 -m discord -v

  • Python v3.7.3-final
  • discord.py v1.2.5-final
  • aiohttp v3.5.4
  • websockets v6.0
  • system info: Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19)
    `
@zomatree

This comment has been minimized.

Copy link

@zomatree zomatree commented Nov 20, 2019

@vr6syncro your bot is not running on discord.py 1.2.5 please make sure you install discord.py and run the bot on the same python version. further more please dont necrobump issues, please ask for help in discord.gg/dpy

@AdriRayns

This comment has been minimized.

Copy link

@AdriRayns AdriRayns commented Nov 20, 2019

I can confirm that it is fixed. I was getting erros in 1.2.4 until I upgraded to 1.2.5 discord.py version.

@avayert avayert mentioned this issue Nov 22, 2019
3 of 3 tasks complete
KabirKwatra added a commit to KabirKwatra/AnimeKiller that referenced this issue Nov 26, 2019
carlzoo pushed a commit to carlzoo/scalperr-discord-bot that referenced this issue Nov 27, 2019
Gillingham added a commit to Gillingham/pollmaster that referenced this issue Dec 6, 2019
Pull in fix for Rapptz/discord.py#2422

Closes matnad#44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can鈥檛 perform that action at this time.