From fedbfedfd5aacc5b3a9f859a4c4f5f5a1d668782 Mon Sep 17 00:00:00 2001 From: Md Jisan <66010486+Jisan09@users.noreply.github.com> Date: Thu, 10 Feb 2022 18:41:05 +0530 Subject: [PATCH] Fix TypeError when loading StringSession (#3714) --- telethon/_sessions/string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/_sessions/string.py b/telethon/_sessions/string.py index 2cb66aa6..7247272e 100644 --- a/telethon/_sessions/string.py +++ b/telethon/_sessions/string.py @@ -48,7 +48,7 @@ class StringSession(MemorySession): takeout_id=0 ) if ip_len == 4: - ipv4 = int.from_bytes(ip, 'big', False) + ipv4 = int.from_bytes(ip, 'big', signed=False) ipv6 = None else: ipv4 = None