-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Timed out getting updates every time only with PTB 11.1.0 and 11.0.0 (no such issue when using PTB 10.1.0) #1323
Comments
Hey, I can confirm that I am also getting the timed out messages on a raspberry pi running Raspbian.
|
Does your bot actually get updates? BTW, I've also tested the bot in Debian, the issue stays the same. |
I haven't looked too much into this yet, but I think I might know why you're gettng timeouts. To "fix" either increase your timeout when polling (easy) updater.start_polling(timeout=60) Or which away from long-polling to webhooks (a bit harder). |
Hey, thanks for your suggestion, but it does not fix the issue. So I am perfectly fine with all that, I just wanted to point that out as maybe some kind of a minor bug or something along those lines. My polling timeout setting always used to be 20 sec, which was working perfectly with logging debug under v10.1, but starting from v11.0 it started to "timeout". Change from 20 to 60 seconds did not have any effect. As for webhooks, I develop the bot locally, so as of now polling is a more convenient option for me. UPD: the "timeout" message occurs every 5 seconds or so, regardless of which timeout arg value is set |
Like @wasyawenski, my bot does still get updates, regardless of these messages. Furthermore, I can confirm that setting the timeout arg on start_polling didn't seem to affect the messages either. |
Can confirm that the latest version is giving disconnect error:
|
Alright, I just merged #1330 which as far as my testing goes, fixes this issue too. @vnoxygen @wasyawenski @djwessel are any of you able to confirm this? Once again - mostly everything works okay even without this change - only it was quite noisy in logs and such. |
Closing due to lack of feedback, assuming #1330 fixed things. |
In a desperate attempt to get python-telegram-bot/python-telegram-bot#1330 and fix python-telegram-bot/python-telegram-bot#1323
I have the same issue with
They appear every 5 seconds or so. Above all I believe it tries to connect to Telegram server again and again hence loading the network. |
Original comment:
Hello,
I've seen a similar issue here, but it did not mention that it only occurs with PTB 11.1.0 and 11.0.0.
I have downgraded PTB back to 10.1.0 to test it again and did not have a single problem, which led me to believe that it is not a network issue.
Steps to reproduce
pip install python-telegram-bot -U
or
pip install python-telegram-bot==11.0.0
start a bot with getUpdates method and logging.DEBUG
Expected behaviour
Bot should get updates
Actual behaviour
after entering getUpdates and starting HTTPS connection, telegram.ext.updater reports Timed out getting Updates: Timed out
and it goes again and again in a loop without success
It happens to be the case only with PTB version 11.0.0 and 11.1.0;
with 10.1.0 I am able to get updates without problems
Configuration
Operating System:
Win10 64bit
Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 11.1.0 or python-telegram-bot 11.0.0
certifi 2018.11.29
future 0.17.1
Python 3.6.4 (i've also updated Python to 3.7.2 - issue persists)
Logs
EDIT:
Despite DEBUG constantly showing Timed out, updates strangely enough do work!
I can only wonder why DEBUG shows this
But it does not cause any problems for me so far, so maybe it is a minor bug,
maybe even Windows only
I have an assumption this probably has something to do with .utils.response module
Can someone please confirm they have similar symptoms?
EDIT 2:
It was in fact a 413 (Request Entity Too Large) error returned by Telegram, which had nothing to do with the file size, but rather it so happened, that some of my files did not have Latin only characters in their names, and Telegram didn't like it. Please disregard this:
The text was updated successfully, but these errors were encountered: