Replies: 2 comments
-
This error seems to be a temporary limit from telegram's api, probably due to sending too many requests to their servers in short period of time or it can be because of lossy internet connection: If it's the first one, you can wait for a few minutes/hours or change your IP by using a VPN.
And if it's the second one, you can set a higher time out when calling on |
Beta Was this translation helpful? Give feedback.
-
Also note that we don't support V12 anymore. |
Beta Was this translation helpful? Give feedback.
-
error :
Traceback (most recent call last):
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connection.py", line 140, in _new_conn
conn = connection.create_connection(
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\util\connection.py", line 60, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 614, in urlopen
httplib_response = self._make_request(conn, method, url,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 360, in _make_request
self._validate_conn(conn)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 857, in _validate_conn
super(HTTPSConnectionPool, self)._validate_conn(conn)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 289, in _validate_conn
conn.connect()
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connection.py", line 284, in connect
conn = self._new_conn()
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connection.py", line 149, in _new_conn
raise NewConnectionError(
telegram.vendor.ptb_urllib3.urllib3.exceptions.NewConnectionError: <telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x000001F86EC16FE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\utils\request.py", line 259, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\request.py", line 68, in request
return self.request_encode_body(method, url, fields=fields,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\request.py", line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 665, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\vendor\ptb_urllib3\urllib3\util\retry.py", line 376, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
telegram.vendor.ptb_urllib3.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot5898594053:AAHcDoucMV60HqsmVVujt2b1_ePZkv1Oks4/getMe (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x000001F86EC16FE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\ATUL KUMAR KUSHWAHA\Desktop\telegram_bot\bot.py", line 36, in
main()
File "c:\Users\ATUL KUMAR KUSHWAHA\Desktop\telegram_bot\bot.py", line 33, in main
updater.start_polling()
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\ext\updater.py", line 422, in start_polling
self._init_thread(self.dispatcher.start, "dispatcher", ready=dispatcher_ready)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\ext\updater.py", line 342, in _init_thread
name=f"Bot:{self.bot.id}:{name}",
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\bot.py", line 372, in id
return self.bot.id
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\bot.py", line 366, in bot
self._bot = self.get_me()
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\bot.py", line 133, in decorator
result = func(*args, **kwargs)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\bot.py", line 453, in get_me
result = self._post('getMe', timeout=timeout, api_kwargs=api_kwargs)
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\bot.py", line 298, in _post
return self.request.post(
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\utils\request.py", line 361, in post
result = self._request_wrapper(
File "C:\Users\ATUL KUMAR KUSHWAHA\AppData\Local\Programs\Python\Python310\lib\site-packages\telegram\utils\request.py", line 265, in _request_wrapper
raise NetworkError(f'urllib3 HTTPError {error}') from error
telegram.error.NetworkError: urllib3 HTTPError HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot5898594053:AAHcDoucMV60HqsmVVujt2b1_ePZkv1Oks4/getMe (Caused by NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x000001F86EC16FE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
Beta Was this translation helpful? Give feedback.
All reactions