0.2.3 - Fehlerhaftes logging und reaction error #65

Closed
opened 2022-10-06 16:14:39 +02:00 by edraft · 2 comments
Owner

Ich schicke in den Kommentaren die jweiligen Exceptions, welche einmal bearbeitet werden müssen.

Ich schicke in den Kommentaren die jweiligen Exceptions, welche einmal bearbeitet werden müssen.
edraft added this to the Sprint 0.2 milestone 2022-10-06 16:14:39 +02:00
edraft added the
bug
label 2022-10-06 16:14:39 +02:00
edraft self-assigned this 2022-10-06 16:14:39 +02:00
edraft added this to the Sprint 0.2 project 2022-10-06 16:14:39 +02:00
Author
Owner

[bot.startup_module_extension] Loaded module: <class 'modules.admin.admin_module.AdminModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.auto_role.auto_role_module.AutoRoleModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.base.base_module.BaseModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.database.database_module.DatabaseModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.moderator.moderator_module.ModeratorModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.permission.permission_module.PermissionModule'>
[bot.startup_module_extension] Loaded module: <class 'modules.boot_log.boot_log_module.BootLogModule'>
[bot.startup_module_extension] Loaded module: <class 'bot_core.core_extension.core_extension_module.CoreExtensionModule'>
[cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/database.log
[cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/commands.log
[cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/message.log
[cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/bot.log
Krümmelmonster:
<2022-10-05 17:59:24.493272> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent
<2022-10-05 17:59:24.493715> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event
await func(*args, **kwargs)
File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove
await self._reaction_handler.handle(payload, 'remove')
File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle
user = await guild.fetch_member(payload.user_id)
File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member
data = await self._state.http.get_member(self.id, member_id)
File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member

<2022-10-05 17:59:33.595935> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent
<2022-10-05 17:59:33.596283> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event
await func(*args, **kwargs)
File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove
await self._reaction_handler.handle(payload, 'remove')
File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle
user = await guild.fetch_member(payload.user_id)
File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member
data = await self._state.http.get_member(self.id, member_id)
File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member

<2022-10-06 13:27:43.935385> [ ERROR ] [ cpl_core.logging.logger_service ]: Log directory not found
Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f4bfaf1f7f0>
transport: <_SelectorSocketTransport closing fd=6>
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 916, in write
n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 690, in _process_write_backlog
self._transport.write(chunk)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 922, in write
self._fatal_error(exc, 'Fatal write error on socket transport')
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 717, in _fatal_error
self._force_close(exc)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 729, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 750, in call_soon
self._check_closed()
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Task exception was never retrieved
future: <Task finished name='discord.py: on_voice_state_update' coro=<Client._run_event() done, defined at /usr/local/lib/python3.10/site-packages/discord/client.py:401> exception=SystemExit()>
Traceback (most recent call last):
File "/app/bot/main.py", line 45, in main
asyncio.run(program.start())
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 600, in run_forever
self._run_once()
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once
handle._run()
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 345, in on_voice_state_update
await self._handle_event(OnVoiceStateUpdateABC, member, before, after)
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 87, in _handle_event
event_instance = self._services.get_service(event_type)
File "/usr/local/lib/python3.10/site-packages/cpl_core/dependency_injection/service_provider.py", line 108, in get_service
implementation = self.build_service(service_type)
File "/usr/local/lib/python3.10/site-packages/cpl_core/dependency_injection/service_provider.py", line 90, in build_service
return service_type(*params)
File "/app/modules/base/events/base_on_voice_state_update_event.py", line 47, in init
self._logger.info(name, f'Module {type(self)} loaded')
File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 193, in info
self._append_log(output)
File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 128, in _append_log
self._fatal_console(name, 'Log directory not found')
File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 280, in _fatal_console
sys.exit()
SystemExit

[bot.startup_module_extension] Loaded module: <class 'modules.admin.admin_module.AdminModule'> [bot.startup_module_extension] Loaded module: <class 'modules.auto_role.auto_role_module.AutoRoleModule'> [bot.startup_module_extension] Loaded module: <class 'modules.base.base_module.BaseModule'> [bot.startup_module_extension] Loaded module: <class 'modules.database.database_module.DatabaseModule'> [bot.startup_module_extension] Loaded module: <class 'modules.moderator.moderator_module.ModeratorModule'> [bot.startup_module_extension] Loaded module: <class 'modules.permission.permission_module.PermissionModule'> [bot.startup_module_extension] Loaded module: <class 'modules.boot_log.boot_log_module.BootLogModule'> [bot.startup_module_extension] Loaded module: <class 'bot_core.core_extension.core_extension_module.CoreExtensionModule'> [cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/database.log [cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/commands.log [cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/message.log [cpl_core.logging.logger_service]: Using log file: logs/2022-10-05/bot.log Krümmelmonster: <2022-10-05 17:59:24.493272> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent <2022-10-05 17:59:24.493715> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event await func(*args, **kwargs) File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove await self._reaction_handler.handle(payload, 'remove') File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle user = await guild.fetch_member(payload.user_id) File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member data = await self._state.http.get_member(self.id, member_id) File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request raise NotFound(response, data) discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member <2022-10-05 17:59:33.595935> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent <2022-10-05 17:59:33.596283> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event await func(*args, **kwargs) File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove await self._reaction_handler.handle(payload, 'remove') File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle user = await guild.fetch_member(payload.user_id) File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member data = await self._state.http.get_member(self.id, member_id) File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request raise NotFound(response, data) discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member <2022-10-06 13:27:43.935385> [ ERROR ] [ cpl_core.logging.logger_service ]: Log directory not found Fatal error on SSL transport protocol: <asyncio.sslproto.SSLProtocol object at 0x7f4bfaf1f7f0> transport: <_SelectorSocketTransport closing fd=6> Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 916, in write n = self._sock.send(data) OSError: [Errno 9] Bad file descriptor During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/asyncio/sslproto.py", line 690, in _process_write_backlog self._transport.write(chunk) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 922, in write self._fatal_error(exc, 'Fatal write error on socket transport') File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 717, in _fatal_error self._force_close(exc) File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 729, in _force_close self._loop.call_soon(self._call_connection_lost, exc) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 750, in call_soon self._check_closed() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed Task exception was never retrieved future: <Task finished name='discord.py: on_voice_state_update' coro=<Client._run_event() done, defined at /usr/local/lib/python3.10/site-packages/discord/client.py:401> exception=SystemExit()> Traceback (most recent call last): File "/app/bot/main.py", line 45, in main asyncio.run(program.start()) File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 633, in run_until_complete self.run_forever() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 600, in run_forever self._run_once() File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1896, in _run_once handle._run() File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 409, in _run_event await coro(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 345, in on_voice_state_update await self._handle_event(OnVoiceStateUpdateABC, member, before, after) File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 87, in _handle_event event_instance = self._services.get_service(event_type) File "/usr/local/lib/python3.10/site-packages/cpl_core/dependency_injection/service_provider.py", line 108, in get_service implementation = self.build_service(service_type) File "/usr/local/lib/python3.10/site-packages/cpl_core/dependency_injection/service_provider.py", line 90, in build_service return service_type(*params) File "/app/modules/base/events/base_on_voice_state_update_event.py", line 47, in __init__ self._logger.info(__name__, f'Module {type(self)} loaded') File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 193, in info self._append_log(output) File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 128, in _append_log self._fatal_console(__name__, 'Log directory not found') File "/usr/local/lib/python3.10/site-packages/cpl_core/logging/logger_service.py", line 280, in _fatal_console sys.exit() SystemExit
Author
Owner

<2022-10-05 17:59:24.493272> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent
<2022-10-05 17:59:24.493715> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event
await func(*args, **kwargs)
File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove
await self._reaction_handler.handle(payload, 'remove')
File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle
user = await guild.fetch_member(payload.user_id)
File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member
data = await self._state.http.get_member(self.id, member_id)
File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member

<2022-10-05 17:59:33.595935> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent
<2022-10-05 17:59:33.596283> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event
await func(*args, **kwargs)
File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove
await self._reaction_handler.handle(payload, 'remove')
File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle
user = await guild.fetch_member(payload.user_id)
File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member
data = await self._state.http.get_member(self.id, member_id)
File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request
raise NotFound(response, data)
discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member

<2022-10-05 17:59:24.493272> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent <2022-10-05 17:59:24.493715> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event await func(*args, **kwargs) File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove await self._reaction_handler.handle(payload, 'remove') File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle user = await guild.fetch_member(payload.user_id) File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member data = await self._state.http.get_member(self.id, member_id) File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request raise NotFound(response, data) discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member <2022-10-05 17:59:33.595935> [ ERROR ] [ cpl_discord.service.discord_service ]: Cannot execute on_raw_reaction_remove of AutoRoleOnRawReactionRemoveEvent <2022-10-05 17:59:33.596283> [ ERROR ] [ cpl_discord.service.discord_service ]: 404 Not Found (error code: 10007): Unknown Member -> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/cpl_discord/service/discord_service.py", line 97, in _handle_event await func(*args, **kwargs) File "/app/modules/auto_role/events/auto_role_on_raw_reaction_remove.py", line 32, in on_raw_reaction_remove await self._reaction_handler.handle(payload, 'remove') File "/app/modules/auto_role/helper/reaction_handler.py", line 37, in handle user = await guild.fetch_member(payload.user_id) File "/usr/local/lib/python3.10/site-packages/discord/guild.py", line 2094, in fetch_member data = await self._state.http.get_member(self.id, member_id) File "/usr/local/lib/python3.10/site-packages/discord/http.py", line 740, in request raise NotFound(response, data) discord.errors.NotFound: 404 Not Found (error code: 10007): Unknown Member
edraft referenced this issue from a commit 2022-10-06 16:51:30 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sh-edraft.de/sh_discord_bot#65
No description provided.