MusicBot icon indicating copy to clipboard operation
MusicBot copied to clipboard

AttributeError: 'ClientUser' object has no attribute 'avatar_url'

Open Razorbackfr opened this issue 1 year ago • 2 comments

What went wrong?

When i try, to add a music with !play or i want see the playlist with !queue, i have the following error :

Traceback (most recent call last): File "/home/valentin/MusicBot/musicbot/bot.py", line 4057, in on_message response = await handler(**handler_kwargs) File "/home/valentin/MusicBot/musicbot/bot.py", line 1649, in cmd_play return await self._cmd_play( File "/home/valentin/MusicBot/musicbot/bot.py", line 1707, in _cmd_play content = self._gen_embed() File "/home/valentin/MusicBot/musicbot/bot.py", line 1361, in _gen_embed icon_url=self.user.avatar_url, AttributeError: 'ClientUser' object has no attribute 'avatar_url'

How do we reproduce this?

Add the music or list the queue

Which version of the bot are you using?

I am using the "review" branch

Which operating system are you using?

Ubuntu 18.04 or higher

Just checking...

  • [X] I have confirmed that my issue has not already been reported.
  • [X] I am using Python 3.8 or higher.
  • [X] I have updated my Python dependencies.

Razorbackfr avatar Aug 28 '22 14:08 Razorbackfr

This appears to be related the change mentioned in this thread (https://github.com/Rapptz/discord.py/issues/7330) that replaced avatar_url with avatar.url. Patching this locally appears to resolve this issue.

x04ty29er avatar Sep 02 '22 00:09 x04ty29er

I tried to patch myself but changes are overwritten every time the bot is started.

You can't directly patch the code of the review branch?

Razorbackfr avatar Sep 02 '22 12:09 Razorbackfr

Duplicate of #2294 #2290 , resolved by #2308

jogerj avatar Oct 16 '22 21:10 jogerj