2023-01-30 22:30:19,823 (__init__.py:1083 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway"
2023-01-30 22:30:19,824 (__init__.py:1085 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1073, in __threaded_polling
polling_thread.raise_exceptions()
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 118, in raise_exceptions
raise self.exception_info
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 100, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 649, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 623, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 321, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 162, in _make_request
json_result = _check_result(method_name, result)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 189, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway
"
2023-01-30 22:30:20,115 (__init__.py:1083 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway"
2023-01-30 22:30:20,115 (__init__.py:1085 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1073, in __threaded_polling
polling_thread.raise_exceptions()
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 118, in raise_exceptions
raise self.exception_info
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 100, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 649, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 623, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 321, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 162, in _make_request
json_result = _check_result(method_name, result)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 189, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway
"
2023-01-30 22:30:20,658 (__init__.py:1083 MainThread) ERROR - TeleBot: "Threaded polling exception: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway"
2023-01-30 22:30:20,659 (__init__.py:1085 MainThread) ERROR - TeleBot: "Exception traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1073, in __threaded_polling
polling_thread.raise_exceptions()
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 118, in raise_exceptions
raise self.exception_info
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 100, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 649, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 623, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 321, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 162, in _make_request
json_result = _check_result(method_name, result)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 189, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 502. Description: Bad Gateway
"
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/lib/python3.9/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.9/http/client.py", line 268, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.9/socket.py", line 704, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.9/ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.9/ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 719, in reraise
raise value
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 447, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=25)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/AF_PatientBot/main.py", line 1404, in <module>
bot.polling(none_stop = True)
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1043, in polling
self.__threaded_polling(non_stop=non_stop, interval=interval, timeout=timeout, long_polling_timeout=long_polling_timeout,
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1118, in __threaded_polling
raise e
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 1073, in __threaded_polling
polling_thread.raise_exceptions()
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 118, in raise_exceptions
raise self.exception_info
File "/usr/local/lib/python3.9/dist-packages/telebot/util.py", line 100, in run
task(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 649, in __retrieve_updates
updates = self.get_updates(offset=(self.last_update_id + 1),
File "/usr/local/lib/python3.9/dist-packages/telebot/__init__.py", line 623, in get_updates
json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates, long_polling_timeout)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 321, in get_updates
return _make_request(token, method_url, params=payload)
File "/usr/local/lib/python3.9/dist-packages/telebot/apihelper.py", line 156, in _make_request
result = _get_req_session().request(
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 529, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=25)