Bot Telegram

Dmitriy Makarov

25.05.2021
Автор темы
Проверенный
2,503
1,132
Что-то бот не хочет запускаться.
Код:
C:\Users\User\Desktop\Bot>python bot.py
2020-02-05 15:16:19,186 (util.py:66 PollingThread) ERROR - TeleBot: "ConnectionE
rror occurred, args=(ProtocolError('Connection aborted.', ConnectionResetError(1
0054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10
054, None)),)
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал сущ
ествующее подключение

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 734, in rera
ise
    raise value.with_traceback(tb)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(1
0054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10
054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetErro
r(10054, 'Удаленный хост принудительно разорвал существующее подключение', None,
 10054, None))
"
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал сущ
ествующее подключение

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 734, in rera
ise
    raise value.with_traceback(tb)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(1
0054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10
054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bot.py", line 11, in <module>
    bot.polling(none_stop=True)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 392, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 415, in __thread
ed_polling
    polling_thread.raise_exceptions()
  File "D:\Python3\lib\site-packages\telebot\util.py", line 79, in raise_excepti
ons
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\six.py", lin
e 693, in reraise
    raise value
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetErro
r(10054, 'Удаленный хост принудительно разорвал существующее подключение', None,
 10054, None))
 

Skepper

Участник
47
12
  • Нравится
Реакции: Dmitriy Makarov

Dmitriy Makarov

25.05.2021
Автор темы
Проверенный
2,503
1,132
windscribe, там короче регаешь акк и тебе дают 2 гб интернета, а у меня короче закончились они и решил я зарегать новый и мне дали 10 гб))
Да и это что-то не особо пашет.

Код:
C:\Users\User\Desktop\Bot>python bot.py
2020-02-05 22:01:38,385 (util.py:66 PollingThread) ERROR - TeleBot: "ReadTimeout
 occurred, args=(ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org',
port=443): Read timed out. (read timeout=3.5)"),)
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
socket.timeout: _ssl.c:1091: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 735, in rera
ise
    raise value
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 379, in _m
ake_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 330, in _r
aise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org'
, port=443): Read timed out. (read timeout=3.5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', po
rt=443): Read timed out. (read timeout=3.5)
"
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
socket.timeout: _ssl.c:1091: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 735, in rera
ise
    raise value
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 379, in _m
ake_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 330, in _r
aise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org'
, port=443): Read timed out. (read timeout=3.5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bot.py", line 11, in <module>
    bot.polling(none_stop=True)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 392, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 415, in __thread
ed_polling
    polling_thread.raise_exceptions()
  File "D:\Python3\lib\site-packages\telebot\util.py", line 79, in raise_excepti
ons
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\six.py", lin
e 693, in reraise
    raise value
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', po
rt=443): Read timed out. (read timeout=3.5)

C:\Users\User\Desktop\Bot>
 

Skepper

Участник
47
12
Да и это что-то не особо пашет.

Код:
C:\Users\User\Desktop\Bot>python bot.py
2020-02-05 22:01:38,385 (util.py:66 PollingThread) ERROR - TeleBot: "ReadTimeout
occurred, args=(ReadTimeoutError("HTTPSConnectionPool(host='api.telegram.org',
port=443): Read timed out. (read timeout=3.5)"),)
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
socket.timeout: _ssl.c:1091: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 735, in rera
ise
    raise value
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 379, in _m
ake_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 330, in _r
aise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org'
, port=443): Read timed out. (read timeout=3.5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', po
rt=443): Read timed out. (read timeout=3.5)
"
Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 376, in _m
ake_request
    self._validate_conn(conn)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 994, in _v
alidate_conn
    conn.connect()
  File "D:\Python3\lib\site-packages\urllib3\connection.py", line 386, in connec
t
    self.sock = ssl_wrap_socket(
  File "D:\Python3\lib\site-packages\urllib3\util\ssl_.py", line 370, in ssl_wra
p_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Python3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Python3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\Python3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
socket.timeout: _ssl.c:1091: The handshake operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 719, in ur
lopen
    retries = retries.increment(
  File "D:\Python3\lib\site-packages\urllib3\util\retry.py", line 400, in increm
ent
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Python3\lib\site-packages\urllib3\packages\six.py", line 735, in rera
ise
    raise value
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 665, in ur
lopen
    httplib_response = self._make_request(
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 379, in _m
ake_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "D:\Python3\lib\site-packages\urllib3\connectionpool.py", line 330, in _r
aise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.telegram.org'
, port=443): Read timed out. (read timeout=3.5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bot.py", line 11, in <module>
    bot.polling(none_stop=True)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 392, in polling
    self.__threaded_polling(none_stop, interval, timeout)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 415, in __thread
ed_polling
    polling_thread.raise_exceptions()
  File "D:\Python3\lib\site-packages\telebot\util.py", line 79, in raise_excepti
ons
    six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
  File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\six.py", lin
e 693, in reraise
    raise value
  File "D:\Python3\lib\site-packages\telebot\util.py", line 60, in run
    task(*args, **kwargs)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 279, in __retrie
ve_updates
    updates = self.get_updates(offset=(self.last_update_id + 1), timeout=timeout
)
  File "D:\Python3\lib\site-packages\telebot\__init__.py", line 249, in get_upda
tes
    json_updates = apihelper.get_updates(self.token, offset, limit, timeout, all
owed_updates)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 194, in get_upd
ates
    return _make_request(token, method_url, params=payload)
  File "D:\Python3\lib\site-packages\telebot\apihelper.py", line 57, in _make_re
quest
    result = _get_req_session().request(method, request_url, params=params, file
s=files,
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 533, in request

    resp = self.send(prep, **send_kwargs)
  File "D:\Python3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "D:\Python3\lib\site-packages\requests\adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.telegram.org', po
rt=443): Read timed out. (read timeout=3.5)

C:\Users\User\Desktop\Bot>
кинь код своего бота полностью
 

Dmitriy Makarov

25.05.2021
Автор темы
Проверенный
2,503
1,132
Добавь модуль Proxy
Другой API попробовал.
Python:
from telegram import Bot
from telegram import Update
from telegram.ext import Updater
from telegram.ext import MessageHandler
from telegram.ext import Filters


TOKEN = 'Токен'

def message_handler(bot: Bot, update: Update):
    user = update.effective_user
    if user:
        name = user.first_name
    else:
        name = 'аноним'

    text = update.effective_message.text
    reply_text = f'Привет, {name}!\n\n{text}'

    bot.send_message(
        chat_id=update.effective_message.chat_id,
        text=reply_text,
    )


def main():
    bot = Bot(
        token=TOKEN,
        base_url='https://telegg.ru/orig/bot',
    )
    updater = Updater(
        bot=bot,
        use_context=True,
    )

    handler = MessageHandler(Filters.all, message_handler)
    updater.dispatcher.add_handler(handler)

    updater.start_polling()
    updater.idle()
Но и он, к сожалению, не реагирует. .-.
48880
 
У

Удалённый пользователь 189829

Гость
Другой API попробовал.
Python:
from telegram import Bot
from telegram import Update
from telegram.ext import Updater
from telegram.ext import MessageHandler
from telegram.ext import Filters


TOKEN = 'Токен'

def message_handler(bot: Bot, update: Update):
    user = update.effective_user
    if user:
        name = user.first_name
    else:
        name = 'аноним'

    text = update.effective_message.text
    reply_text = f'Привет, {name}!\n\n{text}'

    bot.send_message(
        chat_id=update.effective_message.chat_id,
        text=reply_text,
    )


def main():
    bot = Bot(
        token=TOKEN,
        base_url='https://telegg.ru/orig/bot',
    )
    updater = Updater(
        bot=bot,
        use_context=True,
    )

    handler = MessageHandler(Filters.all, message_handler)
    updater.dispatcher.add_handler(handler)

    updater.start_polling()
    updater.idle()
Но и он, к сожалению, не реагирует. .-.
Кхм, у нас телеграм как бэ заблокирован, дело не в api.
Пусти трафик через vpn,proxy
 

k0shaK

Известный
147
112
Кхм, у нас телеграм как бэ заблокирован, дело не в api.
Пусти трафик через vpn,proxy
Он же писал, что не работает у его, когда юзает прокси. И вообще, я заметил это у многих людей с рашки, хоть с прокси, хоть без...