From 44bdfb76510f03a30edf4d47f0cbf075896a0f73 Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Tue, 11 Feb 2020 17:12:56 +0000 Subject: [PATCH] fix --- .../bots.d/{macron.toml => macron.toml.b} | 0 .../bots.d/{patou.toml => patou.toml.b} | 0 klafirc.log | 363 ++++++++++++++++++ klafytg/__init__.py | 1 + klafytg/runner.py | 4 +- 5 files changed, 366 insertions(+), 2 deletions(-) rename etc/klafytg/bots.d/{macron.toml => macron.toml.b} (100%) rename etc/klafytg/bots.d/{patou.toml => patou.toml.b} (100%) diff --git a/etc/klafytg/bots.d/macron.toml b/etc/klafytg/bots.d/macron.toml.b similarity index 100% rename from etc/klafytg/bots.d/macron.toml rename to etc/klafytg/bots.d/macron.toml.b diff --git a/etc/klafytg/bots.d/patou.toml b/etc/klafytg/bots.d/patou.toml.b similarity index 100% rename from etc/klafytg/bots.d/patou.toml rename to etc/klafytg/bots.d/patou.toml.b diff --git a/klafirc.log b/klafirc.log index 05d7004..5685f28 100644 --- a/klafirc.log +++ b/klafirc.log @@ -200,3 +200,366 @@ 2019-04-21 23:13:32,842 :: INFO :: Connection failed : [Failure instance: Traceback (failure with no frames): : An error occurred while connecting: [Failure instance: Traceback (failure with no frames): : Connection to the other side was lost in a non-clean fashion: Connection lost. ]. ] +2020-02-11 17:09:51,046 :: DEBUG :: diff parser start +2020-02-11 17:09:51,047 :: DEBUG :: line_lengths old: 1; new: 1 +2020-02-11 17:09:51,047 :: DEBUG :: -> code[replace] old[1:1] new[1:1] +2020-02-11 17:09:51,048 :: DEBUG :: parse_part from 1 to 1 (to 0 in part parser) +2020-02-11 17:09:51,049 :: DEBUG :: diff parser end +2020-02-11 17:09:51,136 :: DEBUG :: pickle loaded: /home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/jedi/third_party/typeshed/stdlib/2and3/builtins.pyi +2020-02-11 17:09:51,194 :: DEBUG :: pickle loaded: /home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/jedi/third_party/typeshed/stdlib/3/sys.pyi +2020-02-11 17:10:03,871 :: INFO :: Klafirc is running ! +2020-02-11 17:11:07,394 :: INFO :: Klafirc is running ! +2020-02-11 17:11:07,395 :: INFO :: Loading configuration from /home/klafyvel/dev/klafytg/etc/klafytg/bots.d/sel.toml. +2020-02-11 17:11:07,401 :: DEBUG :: Setting singleton dispatcher as +2020-02-11 17:11:07,403 :: INFO :: Loading configuration from /home/klafyvel/dev/klafytg/etc/klafytg/bots.d/patou.toml. +2020-02-11 17:11:07,408 :: DEBUG :: Setting singleton dispatcher as None +2020-02-11 17:11:07,409 :: INFO :: Loading configuration from /home/klafyvel/dev/klafytg/etc/klafytg/bots.d/macron.toml. +2020-02-11 17:11:07,410 :: DEBUG :: Setting singleton dispatcher as None +2020-02-11 17:11:07,410 :: DEBUG :: Entering: get_me +2020-02-11 17:11:07,412 :: DEBUG :: Starting new HTTPS connection (1): api.telegram.org +2020-02-11 17:11:07,501 :: DEBUG :: https://api.telegram.org:443 "GET /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getMe HTTP/1.1" 200 185 +2020-02-11 17:11:07,504 :: DEBUG :: {'id': 909931084, 'first_name': 'sel', 'is_bot': True, 'username': 'MetzSelBot'} +2020-02-11 17:11:07,504 :: DEBUG :: Exiting: get_me +2020-02-11 17:11:07,505 :: DEBUG :: JobQueue thread started +2020-02-11 17:11:07,507 :: DEBUG :: Bot:909931084:dispatcher - started +2020-02-11 17:11:07,509 :: DEBUG :: Dispatcher started +2020-02-11 17:11:07,512 :: DEBUG :: Bot:909931084:updater - started +2020-02-11 17:11:07,512 :: DEBUG :: Entering: get_me +2020-02-11 17:11:07,514 :: DEBUG :: Starting new HTTPS connection (1): api.telegram.org +2020-02-11 17:11:07,513 :: DEBUG :: Updater thread started (polling) +2020-02-11 17:11:07,516 :: DEBUG :: Start network loop retry bootstrap del webhook +2020-02-11 17:11:07,517 :: DEBUG :: Entering: delete_webhook +2020-02-11 17:11:07,542 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/deleteWebhook HTTP/1.1" 200 68 +2020-02-11 17:11:07,544 :: DEBUG :: True +2020-02-11 17:11:07,545 :: DEBUG :: Exiting: delete_webhook +2020-02-11 17:11:07,545 :: DEBUG :: Bootstrap done +2020-02-11 17:11:07,546 :: DEBUG :: Start network loop retry getting Updates +2020-02-11 17:11:07,549 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:07,612 :: DEBUG :: https://api.telegram.org:443 "GET /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getMe HTTP/1.1" 200 185 +2020-02-11 17:11:07,613 :: DEBUG :: {'id': 909931084, 'first_name': 'sel', 'is_bot': True, 'username': 'MetzSelBot'} +2020-02-11 17:11:07,613 :: DEBUG :: Exiting: get_me +2020-02-11 17:11:07,614 :: DEBUG :: JobQueue thread started +2020-02-11 17:11:07,615 :: DEBUG :: Bot:909931084:dispatcher - started +2020-02-11 17:11:07,616 :: DEBUG :: Bot:909931084:updater - started +2020-02-11 17:11:07,617 :: DEBUG :: Updater thread started (polling) +2020-02-11 17:11:07,618 :: DEBUG :: Start network loop retry bootstrap del webhook +2020-02-11 17:11:07,618 :: DEBUG :: Entering: delete_webhook +2020-02-11 17:11:07,628 :: DEBUG :: Dispatcher started +2020-02-11 17:11:07,628 :: DEBUG :: Entering: get_me +2020-02-11 17:11:07,629 :: DEBUG :: Starting new HTTPS connection (1): api.telegram.org +2020-02-11 17:11:07,639 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/deleteWebhook HTTP/1.1" 200 68 +2020-02-11 17:11:07,641 :: DEBUG :: True +2020-02-11 17:11:07,641 :: DEBUG :: Exiting: delete_webhook +2020-02-11 17:11:07,642 :: DEBUG :: Bootstrap done +2020-02-11 17:11:07,642 :: DEBUG :: Start network loop retry getting Updates +2020-02-11 17:11:07,643 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:07,663 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:07,664 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:07,664 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:07,664 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:07,709 :: DEBUG :: https://api.telegram.org:443 "GET /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getMe HTTP/1.1" 200 191 +2020-02-11 17:11:07,711 :: DEBUG :: {'id': 920182607, 'first_name': 'Manu', 'is_bot': True, 'username': 'ManuMilitariBot'} +2020-02-11 17:11:07,711 :: DEBUG :: Exiting: get_me +2020-02-11 17:11:07,712 :: DEBUG :: JobQueue thread started +2020-02-11 17:11:07,713 :: DEBUG :: Bot:920182607:dispatcher - started +2020-02-11 17:11:07,714 :: DEBUG :: Bot:920182607:updater - started +2020-02-11 17:11:07,715 :: DEBUG :: Updater thread started (polling) +2020-02-11 17:11:07,717 :: DEBUG :: Start network loop retry bootstrap del webhook +2020-02-11 17:11:07,718 :: DEBUG :: Entering: delete_webhook +2020-02-11 17:11:07,722 :: DEBUG :: Dispatcher started +2020-02-11 17:11:07,756 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/deleteWebhook HTTP/1.1" 200 68 +2020-02-11 17:11:07,758 :: DEBUG :: True +2020-02-11 17:11:07,759 :: DEBUG :: Exiting: delete_webhook +2020-02-11 17:11:07,759 :: DEBUG :: Bootstrap done +2020-02-11 17:11:07,759 :: DEBUG :: Start network loop retry getting Updates +2020-02-11 17:11:07,760 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:08,665 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:11,783 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:11,784 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:11,785 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:11,785 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:12,786 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:12,810 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:12,811 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:12,812 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:12,813 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:14,313 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:17,416 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:17,417 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:17,417 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:17,418 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:17,825 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:11:17,827 :: DEBUG :: No new updates found. +2020-02-11 17:11:17,828 :: DEBUG :: [] +2020-02-11 17:11:17,828 :: DEBUG :: Exiting: get_updates +2020-02-11 17:11:17,828 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:18,918 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:18,943 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:18,946 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:18,947 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:18,948 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:21,202 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:24,276 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:24,277 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:24,277 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:24,277 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:26,529 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:26,553 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:26,554 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:26,554 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:26,554 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:27,963 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:11:27,965 :: DEBUG :: No new updates found. +2020-02-11 17:11:27,965 :: DEBUG :: [] +2020-02-11 17:11:27,965 :: DEBUG :: Exiting: get_updates +2020-02-11 17:11:27,966 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:29,932 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:29,958 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:29,960 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:29,961 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:29,962 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:33,338 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:33,365 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:33,367 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:33,368 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:33,368 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:38,102 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:11:38,103 :: DEBUG :: No new updates found. +2020-02-11 17:11:38,103 :: DEBUG :: [] +2020-02-11 17:11:38,104 :: DEBUG :: Exiting: get_updates +2020-02-11 17:11:38,104 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:38,433 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:38,459 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:38,461 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:38,462 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:38,463 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:43,530 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:43,556 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:43,558 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:43,559 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:43,559 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:48,240 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:11:48,241 :: DEBUG :: No new updates found. +2020-02-11 17:11:48,242 :: DEBUG :: [] +2020-02-11 17:11:48,243 :: DEBUG :: Exiting: get_updates +2020-02-11 17:11:48,243 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:51,158 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:51,228 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:51,230 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:51,231 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:51,232 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:58,378 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:11:58,379 :: DEBUG :: No new updates found. +2020-02-11 17:11:58,379 :: DEBUG :: [] +2020-02-11 17:11:58,380 :: DEBUG :: Exiting: get_updates +2020-02-11 17:11:58,380 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:58,830 :: DEBUG :: Entering: get_updates +2020-02-11 17:11:58,855 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 409 143 +2020-02-11 17:11:58,858 :: ERROR :: Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:58,860 :: DEBUG :: Processing Update: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:11:58,861 :: ERROR :: No error handlers are registered, logging exception. +Traceback (most recent call last): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 378, in _network_loop_retry + if not action_cb(): + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/ext/updater.py", line 339, in polling_action_cb + allowed_updates=allowed_updates) + File "", line 2, in get_updates + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator + result = func(*args, **kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/bot.py", line 2067, in get_updates + result = self._request.post(url, data, timeout=float(read_latency) + float(timeout)) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 334, in post + **urlopen_kwargs) + File "/home/klafyvel/.local/share/virtualenvs/klafytg-5VSpbXko/lib/python3.6/site-packages/telegram/utils/request.py", line 249, in _request_wrapper + raise Conflict(message) +telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running +2020-02-11 17:12:08,516 :: DEBUG :: https://api.telegram.org:443 "POST /bot920182607:AAGfIpNWlw1cc_2ulhgRNUXfDXOBkxgXX6c/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:12:08,517 :: DEBUG :: No new updates found. +2020-02-11 17:12:08,518 :: DEBUG :: [] +2020-02-11 17:12:08,518 :: DEBUG :: Exiting: get_updates +2020-02-11 17:12:08,519 :: DEBUG :: Entering: get_updates +2020-02-11 17:12:08,855 :: DEBUG :: https://api.telegram.org:443 "POST /bot909931084:AAFn_I4W3cyTu4Hj3dYxCNQb42q1wEYdV4I/getUpdates HTTP/1.1" 200 23 +2020-02-11 17:12:08,857 :: DEBUG :: No new updates found. +2020-02-11 17:12:08,857 :: DEBUG :: [] +2020-02-11 17:12:08,857 :: DEBUG :: Exiting: get_updates +2020-02-11 17:12:08,857 :: DEBUG :: Entering: get_updates diff --git a/klafytg/__init__.py b/klafytg/__init__.py index 0892ce8..826cbd9 100644 --- a/klafytg/__init__.py +++ b/klafytg/__init__.py @@ -3,5 +3,6 @@ A simple irc bot. See /etc/klafirc/bots.yaml to see which bots are runned. """ from .bot import Bot +from .runner import run __version__ = "0.1" diff --git a/klafytg/runner.py b/klafytg/runner.py index a51a793..dabdbd8 100644 --- a/klafytg/runner.py +++ b/klafytg/runner.py @@ -1,12 +1,12 @@ from pathlib import Path -from .settings import logger, BOT_FILE +from .settings import logger, BOT_FOLDER from .bot import Bot def run(): logger.info("Klafirc is running !") folder = Path(BOT_FOLDER) - bots = [Bot(filename.resolve()) for filename in folder / "*.toml"] + bots = [Bot(filename.resolve()) for filename in folder.glob("*.toml")] for b in bots: b.start() return bots