From 8c9e5e6753674f6caa4f829e3cce3e3322e1efd5 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 13 Mar 2019 12:14:08 +0100 Subject: [PATCH] Fix PhotoSize parsing --- pyrogram/client/types/messages_and_media/photo_size.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/types/messages_and_media/photo_size.py b/pyrogram/client/types/messages_and_media/photo_size.py index e1be74df..116b564c 100644 --- a/pyrogram/client/types/messages_and_media/photo_size.py +++ b/pyrogram/client/types/messages_and_media/photo_size.py @@ -81,6 +81,6 @@ class PhotoSize(PyrogramType): ), width=getattr(photo_size, "w", 0), height=getattr(photo_size, "h", 0), - file_size=getattr(photo_size, "size", len(photo_size.bytes)), + file_size=getattr(photo_size, "size", len(getattr(photo_size, "bytes", b""))), client=client )