Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

Bug in download_media function

Open ingria opened this issue 2 years ago • 0 comments

thumb is not defined anywhere.

Code that causes the issue

channel = await self.client(channels.GetFullChannel(...))
contents = await self.client.download_media(channel.full_chat.chat_photo)

Traceback

Traceback (most recent call last):
  File "/home/telegram/worker/./app/controllers.py", line 71, in utils_getChannelAvatar
    contents = await self.client.download_media(photo)
  File "/home/telegram/.venv/worker/lib/python3.8/site-packages/telethon/_client/downloads.py", line 293, in download_media
    self, media, file, date, thumb, progress_callback
NameError: name 'thumb' is not defined

ingria avatar Mar 26 '22 14:03 ingria