From 39e899294f1c863f33680689d2a2ad1ffaf262fd Mon Sep 17 00:00:00 2001 From: vegeta1k95 <32207817+vegeta1k95@users.noreply.github.com> Date: Wed, 4 Nov 2020 09:58:20 +0100 Subject: [PATCH] Fix unhandled ValueError inside _dispatch_update() task (#1615) --- telethon/client/updates.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 4a9c2d4b..2c2b2836 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -397,6 +397,11 @@ class UpdateMethods: # the channel. Because these "happen sporadically" (#1428) # we should be okay (no flood waits) even if more occur. pass + except ValueError: + # There is a chance that GetFullChannelRequest and GetDifferenceRequest + # inside the _get_difference() function will end up with + # ValueError("Request was unsuccessful N time(s)") for whatever reasons. + pass if not self._self_input_peer: # Some updates require our own ID, so we must make sure