diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 38053781..d7828d01 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -225,7 +225,7 @@ class AuthMethods(MessageParseMethods, UserMethods): print('Invalid password. Please try again', file=sys.stderr) else: - raise errors.PasswordHashInvalidError(None) + raise errors.PasswordHashInvalidError(request=None) else: me = await self.sign_in(phone=phone, password=password) diff --git a/telethon/client/users.py b/telethon/client/users.py index 7bcd0ec0..e5c31b11 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -35,7 +35,7 @@ class UserMethods(TelegramBaseClient): await asyncio.sleep(diff, loop=self._loop) self._flood_waited_requests.pop(r.CONSTRUCTOR_ID, None) else: - raise errors.FloodWaitError(r, capture=diff) + raise errors.FloodWaitError(request=r, capture=diff) request_index = 0 self._last_request = time.time()