onionj / pybotnet

PyBotNet: A Remote Control Framework for Python with Telegram Integration
https://onionj.github.io/pybotnet/
GNU Lesser General Public License v2.1
254 stars 73 forks source link

Error executing python3 -m pybotnet #42

Closed ghost closed 1 year ago

ghost commented 1 year ago

When I put python3 -m pybotnet with the parameters put this:

Traceback (most recent call last): File "/root/pybotnet/pybotnet/engines/telegram_engine.py", line 78, in send res.append(self._http_request(method="POST", url=api_url)) File "/root/pybotnet/pybotnet/engines/telegram_engine.py", line 113, in _http_request return requests.request(method=method, url=url, timeout=15).json()["result"] KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/pybotnet/pybotnet/main.py", line 52, in BotNet(engine, bot_name=args.name, debug=args.debug).run() File "/root/pybotnet/pybotnet/botnet.py", line 378, in run self.engine.send("Botnet Start", self.system_info()) File "/root/pybotnet/pybotnet/engines/telegram_engine.py", line 82, in send raise EngineException(e) pybotnet.exceptions.EngineException: 'result'

onionj commented 1 year ago

Thank you for reporting this bug, I will check and fix this soon.

Are you set on you're chat_id, and bot_token correctly?