-
Notifications
You must be signed in to change notification settings - Fork 475
Too many requests, retry after 1 #165
Comments
I'm also having the same error, started on Sept 23rd out of nowhere. My bot is hosted on Heroku, and the error happened even when I specified to use Telepot 8.3 setWebhook() with no arguments raises no exception In the end I set the webhook manually and commented out the command in my code. Is the webhook something you can just set and forget? (unless, of course, you change hosts or bot token) |
I managed to fix it by importing time and setting it to sleep before each |
Did you have |
No, I had the empty one being called before setting the URL. I have updated my code, in case you want to take a look |
Oops, sorry, I was too focused on the problem and forgot that you posted your code. |
Hi guys, thanks for diagnosing the problem. I first thought it had something to do with my setting Out of pure curiosity, why do you need >>> bot.setWebhook('https://k.whatever.org/abc')
True
>>> bot.setWebhook('https://k.whatever.org/abcde')
True It seems there's no need to unset it before setting it. Since this is very obvious, I am sure you guys have some reason to do it. Please enlighten me. |
Initially I had the bot running locally with long-polling Then when researching how to make it work on Heroku, I found the Heroku Sample code I mentioned above, and it had the lines
I just never questioned it and also included it in my code, since I am still a complete newbie when it comes to connectivity in apps. |
Same for me, I saw the Heroku example and it cleared the webhook before setting it again, so I added it to my code. Anyways, what's the issue? Is it with Telegram or the API code? |
Ok, so it seems this line is NOT needed: bot.setWebhook() To set webhook URL, you only need this line: bot.setWebhook(URL + secret) And you can forget about all those I seldom use webhook myself, so the above comment is only as far as I can see. |
I still get the error. I'm hosting on Heroku and my code is bot.message_loop({'chat': on_get_message}, source=UPDATE_QUEUE)
@app.route(SECRET, methods=['POST', 'GET'])
def pass_update():
UPDATE_QUEUE.put(request.data)
return 'OK'
sleep(5)
bot.setWebhook(URL + SECRET) (added more than the two last lines for context since it might be wrong) |
@Noammac any news? I'm facing the same here |
Nope. Not a single change, the bots work for one second before erroring and On Tue, 18 Oct 2016 15:10 Lenin Medeiros, [email protected] wrote:
|
same problem: if webhook_url != bot.getWebhookInfo()['url']:
bot.setWebhook(webhook_url) |
I erased the setWebhook line and committed it, and it worked! The bit On Tue, 25 Oct 2016 17:47 Dmitriy Boger, [email protected] wrote:
|
I updated my bot code, and updated the dependencies as well.
After updating, my bot, hosted on OpenShift, will constantly crash with:
I tried contacting Telegram's bot support, but they said I was setting the callback multiple times, when I am not (or I think so). In case anyone's interested, here's my code
I don't know why this is happening. Everything is the same since I last updated my bot.
The text was updated successfully, but these errors were encountered: