I did an update to latest stable version and I'm getting an error after log pre-scanning.
Traceback (most recent call last):
File "/home/game1/ArmaRconDiscordBot/modules/arma/module.py", line 81, in on_ready
self.CommandRcon = self.bot.cogs["CommandRcon"]
KeyError: 'CommandRcon'
Thanks for the help in advance.
Attaching more output that I've got.
2022-09-24 14:54:00 WARNING discord.gateway Shard ID None heartbeat blocked for more than 340 seconds.
Loop thread traceback (most recent call last):
File "/home/game1/ArmaRconDiscordBot/bot.py", line 69, in <module>
main()
File "/home/game1/ArmaRconDiscordBot/bot.py", line 58, in main
bot.run(cfg["TOKEN"])
File "/home/game1/.local/lib/python3.10/site-packages/discord/client.py", line 828, in run
asyncio.run(runner())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete
self.run_forever()
File "/usr/lib/python3.10/asyncio/base_events.py", line 600, in run_forever
self._run_once()
File "/usr/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once
handle._run()
File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1012, in load_extension
await self._load_from_module_spec(spec, name)
File "/home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 946, in _load_from_module_spec
await setup(self)
File "/home/game1/ArmaRconDiscordBot/modules/arma/module.py", line 346, in setup
await bot.add_cog(CommandArma(bot))
File "/home/game1/ArmaRconDiscordBot/modules/arma/module.py", line 44, in __init__
self.readLog.pre_scan()
File "/home/game1/ArmaRconDiscordBot/modules/arma/readLog.py", line 212, in pre_scan
self.scanfile(_log)
File "/home/game1/ArmaRconDiscordBot/modules/arma/readLog.py", line 314, in scanfile
self.processLogLine(line)
File "/home/game1/ArmaRconDiscordBot/modules/arma/readLog.py", line 230, in processLogLine
timestamp, msg = self.splitTimestamp(line)
File "/home/game1/ArmaRconDiscordBot/modules/arma/readLog.py", line 296, in splitTimestamp
m = re.match(r"^\s?([0-9]{1,2}:[0-9]{2}:[0-9]{2})\s(.*)", log_line)
File "/usr/lib/python3.10/re.py", line 190, in match
return _compile(pattern, flags).match(string)
Traceback (most recent call last):
File "/home/game1/ArmaRconDiscordBot/modules/arma/module.py", line 81, in on_ready
self.CommandRcon = self.bot.cogs["CommandRcon"]
KeyError: 'CommandRcon'
'CommandRcon'
2022-09-24 14:54:01 ERROR discord.client Ignoring exception in on_ready
Traceback (most recent call last):
File "/home/game1/.local/lib/python3.10/site-packages/discord/client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "/home/game1/ArmaRconDiscordBot/bot.py", line 45, in on_ready
roles += await guild.fetch_roles()
File "/home/game1/.local/lib/python3.10/site-packages/discord/guild.py", line 3069, in fetch_roles
data = await self._state.http.get_roles(self.id)
File "/home/game1/.local/lib/python3.10/site-packages/discord/http.py", line 624, in request
async with self.__session.request(method, url, **kwargs) as response:
File "/home/game1/.local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
self._resp = await self._coro
File "/home/game1/.local/lib/python3.10/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/home/game1/.local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 894, in start
with self._timer:
File "/home/game1/.local/lib/python3.10/site-packages/aiohttp/helpers.py", line 720, in __exit__
raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError
2022-09-24 14:54:02 INFO discord.gateway Shard ID None session has been invalidated.
2022-09-24 14:54:07 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: 66dac5bd1656c7e94b35eaf2fd547599).
Logged in as Liberation [817030019842834482]
<discord.utils.SequenceProxy object at 0x7f8a695f8b50>
------------
Task exception was never retrieved
future: <Task finished name='Task-26' coro=<BotBase.load_extension() done, defined at /home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py:961> exception=ExtensionAlreadyLoaded("Extension 'modules.arma.module' is already loaded.")>
Traceback (most recent call last):
File "/home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1006, in load_extension
raise errors.ExtensionAlreadyLoaded(name)
discord.ext.commands.errors.ExtensionAlreadyLoaded: Extension 'modules.arma.module' is already loaded.
Task exception was never retrieved
future: <Task finished name='Task-27' coro=<BotBase.load_extension() done, defined at /home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py:961> exception=ExtensionAlreadyLoaded("Extension 'modules.core.module' is already loaded.")>
Traceback (most recent call last):
File "/home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1006, in load_extension
raise errors.ExtensionAlreadyLoaded(name)
discord.ext.commands.errors.ExtensionAlreadyLoaded: Extension 'modules.core.module' is already loaded.
Task exception was never retrieved
future: <Task finished name='Task-28' coro=<BotBase.load_extension() done, defined at /home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py:961> exception=ExtensionAlreadyLoaded("Extension 'modules.errorhandle.module' is already loaded.")>
Traceback (most recent call last):
File "/home/game1/.local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 1006, in load_extension
raise errors.ExtensionAlreadyLoaded(name)
discord.ext.commands.errors.ExtensionAlreadyLoaded: Extension 'modules.errorhandle.module' is already loaded.
Exiting...
Exiting... A
Bot Terminated (KeyboardInterrupt)