telethon.errors.rpcerrorlist.FloodWaitError while sending message to batch of phone numbers

See original GitHub issue

Code that causes the issue

from telethon.sync import TelegramClient
with TelegramClient('anon', API_ID, API_HASH) as client:
    for phone_number in phone_numbers:
        await client.send_message(phone_number, 'test message')

Traceback

functions.contacts.GetContactsRequest(0))).users:
  File "/Users/plastun/venv/telethon/lib/python3.7/site-packages/telethon/client/users.py", line 74, in __call__
    result = await future
telethon.errors.rpcerrorlist.FloodWaitError: A wait of 6991 seconds is required (caused by GetContactsRequest)

Is there any efficient way to send messages to my contacts? I just want to send message to all my contacts.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
Lonamicommented, Mar 11, 2020

Working as intended, not a bug.

6reactions
edelvallecommented, Mar 19, 2020

I click https://github.com/LonamiWebs/Telethon/issues?q=is%3Aissue++FloodWaitError

On every issue there is @Lonami being not very helpful at all.

This is not a problem of your library, but you will just get asked again and again about it. Instead of not being helpful, as for sure you have some more insight into this issue than we do. Could you point us to the right direction? Tell us where can we find a solution or report this problem, or why does it happen at all?

Because closing issues and just telling: “Working as intended, not a bug.” and “Not the place to task” is not very or kind.

Anyway, thank you very much for this library! I know how much effort takes to make any open source project work and how much times it consumes, not just in development, but also answering questions about it and receiving complains.

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

telethon.errors.rpcerrorlist.FloodWaitError: A wait of 41548 ...
Telegram is preventing your account from inviting members to a group in a bot-like manner. You can either wait and retry after 41548...
Read more >
SOLVED: FloodWaitError ('A wait of 27 seconds is ... - YouTube
telethon. errors.common.MultiError: ([ FloodWaitError ('A wait of 28 seconds is required (caused by GetParticipantsRequest)'), None, None, ...
Read more >
RPC Errors — Telethon 1.26.0 documentation
RPC stands for Remote Procedure Call, and when the library raises a RPCError , it's because you have invoked some of the API...
Read more >
How to use the telethon.errors function in Telethon
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >
RPC Errors — Telethon 1.7.7 documentation
RPC Errors¶. RPC stands for Remote Procedure Call, and when the library raises a RPCError , it's because you have invoked some of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found