-
Notifications
You must be signed in to change notification settings - Fork 2k
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
HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot #528
Comments
@vashchukmaksim |
@M1LKYWVY Unfortunately it didn't help. And actually I got a strange behaviour right now. If I set timeout to 123, it crashes with 409 error because thinks that multiple getUpdates running. If I remove while cycle (and keep 123 timeout) it repeats the initial error. Also if I remove polling and trying to call just |
I simplified everything just to: bot.py
app.py
I tried to turn off a proxy since on my current network I can use telegram directly but I still get the same error (and with proxy enabled I still got the same)
|
Hm, I think I found out a problem but I don't know how to solve it. The case I suppose in setting a proxy because when I tried to access a telegram.org in the browser I got an SSL error, and when I turn on a VPN it works. So now I think that telebot just ignores |
Found solution here, thanks for @kostykoff |
@Onefivefournine sorry, but receipt does not work properly |
Experiening the same issue.
окт 28 20:05:34 ubuntubook bot.py[3614]: Traceback (most recent call last): Please assist to sort this out. |
Are you solve this program? |
The same problem |
Does not solve my problem |
Unfortunately no. I moved to python-telegram-bot. |
I have the same problem :( no solution right now |
i have same problem, please update me |
and I have the same problem :( |
@ivin-v no it’s not the case here since we trying to use a proxy to get over the problem you mentioned but we can’t because of this issue. |
@vashchukmaksim Максим, значит дело не только в блокировке? Мой бот перестал работать 11.01.19 |
Как вы видите, этот issue возникает у многих, а ни ответов, ни решений на уровне библиотеки нет, я даже думал покапаться и сделать PR, но пересел на python-telegram-bot и вполне доволен, очень внятная документация и все работает. |
i want to scrap wikipedia, and this problem happened too |
+1 not work (exp: echo bot): Failed to establish a new connection: [Errno 101] Network is unreachable',)) |
VPN solves the issue for me. Seems like the issue is on Internet Provider’s side in my case. Maybe it’s related to Telegram ban in Russia. As another proof of that idea my bot also perfectly works on Heroku. Conclusion: Try to use free VPN to check if it’s related to Telegram ban. |
In my case, I just changed the library to python-telegram-bot and the problem went away, so the problem is in the code and not in the proxy. I had to rewrite the whole code |
My solution: |
in my case i just tried to use socks5 proxy, but without any success |
Worked for me with version 2.20.0 |
@apocolistm thanks for the solution, it worked! One letter fixed it all! |
nice answer,tks |
Try changing the connection in the telebot library in the apihelper.py file |
Hy guys, |
Hi. |
Please let me know if it is solved yet.. |
I have request 2.25.1 installed and the issue still occurs |
I encountered this problem when I deployed the Telegram bot (based on pytelegrambotapi) on a fairly secure customer server, at that time I found a hotfix, but extremely doubtful: In the file sessions.py for the "requests" library, I set the value to "self.verify = False" (instead of True) in the Session class. ! However, I strongly advise against deploying a bot with such edits in production, since in this case it will be vulnerable to man-in-the-middle (MitM) attacks. If my solution helped you, most likely you (on your server or local machine) have some problems with SSL. |
Hi guys. If there are no problems with the DNS and proxy settings, then most likely the matter is in the certificate. Here are the lines of code that might solve the problem: import os, certifi |
Packages:
pyTelegramBotAPI==3.6.3
requests==2.19.1
PySocks==1.6.8
urllib3==1.23
OS: MacOS or Ubuntu 16 (via docker)
Python: Python 3.5.3 or PyPy3 (also 3.5.3)
Problem:
I successfully ran a bot some hours ago but after some time it starts to throw an error. I have to use a proxy (and it worked with a proxy at the beginning). I tried HTTPS, SOCKS5 proxies and I'm sure that they are working ones but I still get this error and I suppose that Telegram servers are fine right now. There are many posts in the internet with the same error but they have no information and solutions to the problem (beside the fact that people switch to some other packages).
Don't know if this is a bug or not, but as there are no answers in other places I decided to put it here.
Code:
Traceback:
UPD:
Tried my former code that uses
python-telegram-bot
with the sameTG_PROXY
andTG_BOT_TOKEN
and everything works ok. So it's not a proxy / telegram servers or "ban" problem.The text was updated successfully, but these errors were encountered: