-
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed as not planned
Labels
enhancementNew feature or requestNew feature or request
Description
Checklist
- I believe the idea is awesome and would benefit the framework
- I have searched in the issue tracker for similar requests, including closed ones
Description
When I'm uploading a file I get this error every time. I can't catch it or treat it. It's two messages
-
Telegram says: [420 FLOOD_PREMIUM_WAIT_X] (caused by "upload.SaveBigFilePart") Pyrogram 2.1.37 thinks: A wait of 14 seconds is required
-
Channel_Filter] Waiting for 9 seconds before continuing (required by "upload.GetFile")
I tried as the documentation says but no success:
from pyrogram.errors import FloodWait
try:
await self.send_video(
chat_id=chat_id,
video=file_path,
)
except FloodWait as e:
print(f"Rate limit hit. Waiting for {e.value} seconds...")
await asyncio.sleep(e.value)
But it seems that the error is treated internally in the client.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request