Задать вопрос
vera_ira
@vera_ira
Делаю приложение по изучению Иврит (Python Kotlin)

Как исправить ошибки в боте?

Вернулась к боту спустя пару недель. Запустила и после первого запроса такое выдал. Не могу разобраться куда копать? Подскажите.
2018-10-29 12:48:49,496 (util.py:65 PollingThread) ERROR - TeleBot: "ConnectTimeout occurred, args=(MaxRetryError("HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot649588171:AAF3kNROqMtCYVfuIT9TOk9hF7ZF1lW0TkQ/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)'))",),)
Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
    raise err
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 284, in connect
    conn = self._new_conn()
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 146, in _new_conn
    (self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot649588171:AAF3kNROqMtCYVfuIT9TOk9hF7ZF1lW0TkQ/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\util.py", line 59, in run
    task(*args, **kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 277, in __retrieve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 247, in get_updates
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\apihelper.py", line 180, in get_updates
    return _make_request(token, method_url, params=payload)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\apihelper.py", line 54, in _make_request
    timeout=(connect_timeout, read_timeout), proxies=proxy)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\adapters.py", line 496, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot649588171:AAF3kNROqMtCYVfuIT9TOk9hF7ZF1lW0TkQ/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)'))
"
Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 141, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\connection.py", line 83, in create_connection
    raise err
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 284, in connect
    conn = self._new_conn()
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connection.py", line 146, in _new_conn
    (self.host, self.timeout))
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\adapters.py", line 440, in send
    timeout=timeout
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\urllib3\util\retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot649588171:AAF3kNROqMtCYVfuIT9TOk9hF7ZF1lW0TkQ/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/Irina/PycharmProjects/st/Tele_bot1.py", line 475, in <module>
    bot.polling(none_stop=True, interval=0) #Функция, которая обновляет постоянно информацю с сервера.
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 390, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 413, in __threaded_polling
    polling_thread.raise_exceptions()
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\util.py", line 78, in raise_exceptions
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\six.py", line 693, in reraise
    raise value
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\util.py", line 59, in run
    task(*args, **kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 277, in __retrieve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\__init__.py", line 247, in get_updates
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, allowed_updates)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\apihelper.py", line 180, in get_updates
    return _make_request(token, method_url, params=payload)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\telebot\apihelper.py", line 54, in _make_request
    timeout=(connect_timeout, read_timeout), proxies=proxy)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Irina\PycharmProjects\st\venv\lib\site-packages\requests\adapters.py", line 496, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /bot649588171:AAF3kNROqMtCYVfuIT9TOk9hF7ZF1lW0TkQ/getUpdates?offset=1&timeout=20 (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x036C9790>, 'Connection to api.telegram.org timed out. (connect timeout=3.5)'))
  • Вопрос задан
  • 5574 просмотра
Подписаться 1 Простой 4 комментария
Решения вопроса 1
vera_ira
@vera_ira Автор вопроса
Делаю приложение по изучению Иврит (Python Kotlin)
VPN решил вопрос.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы