From 6cf6b156fc4be52edecf1961f960889b70fd1278 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 14 Mar 2021 00:44:54 +0200 Subject: [PATCH] Make input entity errors less useless The `repr()` of TL types is just the class name and pointer, which is pretty much completely useless for any purpose. This changes the error to use `str()` instead, which shows the contents of the entity (i.e. the user ID) --- telethon/client/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/users.py b/telethon/client/users.py index 6a5fc484..df758ab9 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -459,7 +459,7 @@ class UserMethods: pass raise ValueError( - 'Could not find the input entity for {!r}. Please read https://' + 'Could not find the input entity for {!s}. Please read https://' 'docs.telethon.dev/en/latest/concepts/entities.html to' ' find out more details.' .format(peer)