"/usr/local/lib/python3.6/dist-packages/telebot/util.py", line 62, in run
task(*args, **kwargs)
File "app_wh.py", line 125, in lessons
bot.reply_to(message, "some sample text")
File "/usr/local/lib/python3.6/dist-packages/telebot/__init__.py", line 1303, in reply_to
return self.send_message(message.chat.id, text, reply_to_message_id=message.message_id, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/telebot/__init__.py", line 625, in send_message
reply_markup, parse_mode, disable_notification, timeout))
File "/usr/local/lib/python3.6/dist-packages/telebot/apihelper.py", line 159, in send_message
return _make_request(token, method_url, params=payload, method='post')
File "/usr/local/lib/python3.6/dist-packages/telebot/apihelper.py", line 63, in _make_request
timeout=(connect_timeout, read_timeout), proxies=proxy)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(104, 'ECONNRESET')",))
"
Я ловлю эту ошибку, что с веб хуками, что с полинг. + Меня выбрасывает из цыкла и скрипт отваливается
#!/bin/bash
myscript(){
python3 app_wh.py [args..]
}
until myscript; do
echo "'myscript' crashed with exit code $?. Restarting..." >&2
sleep 10
done
Что за говно
Обсуждают сегодня