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)
This commit is contained in:
Tulir Asokan 2021-03-14 00:44:54 +02:00 committed by GitHub
parent 52ae9f09ce
commit 6cf6b156fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)