From b47c5a93b16c084a6b3f867698d0f3c4340803aa Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 12 Feb 2021 12:36:32 +0100 Subject: [PATCH] Fix enum items showing ids instead of names --- pyrogram/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/utils.py b/pyrogram/utils.py index 1082dade..236d9c7b 100644 --- a/pyrogram/utils.py +++ b/pyrogram/utils.py @@ -52,10 +52,10 @@ def get_input_media_from_file_id( file_type = decoded.file_type if expected_file_type is not None and file_type != expected_file_type: - raise ValueError(f'Expected: "{expected_file_type}", got "{file_type}" file_id instead') + raise ValueError(f"Expected {expected_file_type.name}, got {file_type.name} file id instead") if file_type in (FileType.THUMBNAIL, FileType.CHAT_PHOTO): - raise ValueError(f"This file_id can only be used for download: {file_id}") + raise ValueError(f"This file id can only be used for download: {file_id}") if file_type in PHOTO_TYPES: return raw.types.InputMediaPhoto(