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

apps Error : RetryAfter() #20

Open
newton21890 opened this issue May 29, 2018 · 2 comments
Open

apps Error : RetryAfter() #20

newton21890 opened this issue May 29, 2018 · 2 comments

Comments

@newton21890
Copy link

newton21890 commented May 29, 2018

I'm trying to use django-telegram bot but during the running phase I have this error frequently:

ERROR 2018-05-29 16:28:47,375 apps Error : RetryAfter()
after this message the system doesn't work, this is the message during the chat:

WARNING 2018-05-29 16:28:55,619 views Request for not found token : XXXXXXXXXXXXXX
[29/May/2018 16:28:55]"POST /prefix/XXXXXXXXXXXXXXXX/ HTTP/1.1" 200 2

The result is that I don't receive any message in telegram.

I think the problem is in the rapidly sequence of instruction in apps.py file during the setWebhook phase .
A possible solution that I finded is this:

setted = bot.setWebhook(hookurl, certificate=certificate, timeout=timeout, max_connections=max_connections, allowed_updates=allowed_updates)
time.sleep(5)
webhook_info = bot.getWebhookInfo()

I added to time.sleep function and now the system seems to work.

@jafrancov
Copy link

jafrancov commented Nov 9, 2018

Have you find any other solution? When I add that line, sends me a 404 page.

@jafrancov
Copy link

@newton21890 Best approach to solve it PR #10

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

2 participants