Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[420 FLOOD_WAIT_X] #100

Open
3 tasks done
batreller opened this issue Oct 27, 2024 · 0 comments
Open
3 tasks done

[420 FLOOD_WAIT_X] #100

batreller opened this issue Oct 27, 2024 · 0 comments

Comments

@batreller
Copy link

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version

Description

Telegram says: [420 FLOOD_WAIT_X] - A wait of 78 seconds is required (caused by "contacts.ResolveUsername")

here is my code that causes the error

peer = await client.resolve_peer('username')

seems like the problem is caused because I am resolving peer by getting full user by his username instead of just getting it by user_id and access_hash, however, after checking .session file I noticed that there is no peers stored at all. I opened it as SQLite database and opened peers table. It is completely empty.
Is it problem on my side or am I doing anything wrong? Why pyrogram does not cache user_id, access_hash and other fields so I could just get user from cache instead of resolving user by username every time

Steps to reproduce

  1. Call .resolve_peer('username') method a few times

Code example

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant