LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.8k stars 1.39k forks source link

Can't upload large file because FLOOD_PREMIUM_WAIT_9 (caused by SaveFilePartRequest) keeps interrupting the upload #4419

Closed doublep21 closed 2 months ago

doublep21 commented 2 months ago

Code that causes the issue

await client.send_file( forward, filepath, thumb=thumb, caption=caption, force_document=False, silent=True, progress_callback=lambda x, y: progress_bar(x, y, file), attributes=[ DocumentAttributeVideo(duration, videohw[0], videohw[1], False, supports_streaming=True) ] )

Expected behavior

upload a file even if i have to wait for cooldown

Actual behavior

the upload stops and i need to restart it in a infinite loop

Traceback

An error occurred: RPCError 420: FLOOD_PREMIUM_WAIT_9 (caused by SaveBigFilePartRequest)

Telethon version

1.36.1

Python version

3.8

Operating system (including distribution name and version)

debian 10

Other details

No response

Checklist

doublep21 commented 2 months ago

Will Telegram be slowing connections to stimulate Premium purchases? Latest Telegram iOS sources revealed a new server error prefix FLOOD_PREMIUM_WAIT

When server returns this error, Telegram will show an alert with an offer to subscribe to Premium and make your network requests faster.

Lonami commented 2 months ago

Duplicate of #4417.