diff --git a/plugins/admidio_events/admidio_events.py b/plugins/admidio_events/admidio_events.py
index dba3d09..44c601a 100644
--- a/plugins/admidio_events/admidio_events.py
+++ b/plugins/admidio_events/admidio_events.py
@@ -282,53 +282,56 @@ class Plugin:
room.send_html(self.messages['info_event_id_err'])
return
- # Set header
- html_message = self.messages['event_participants_head'].format(
- len(self.adm.events[id_event].getAllAttend()),
- self.adm.events[id_event].number_of_guests,
- self.adm.events[id_event].name)
+ try:
+ # Set header
+ html_message = self.messages['event_participants_head'].format(
+ len(self.adm.events[id_event].getAllAttend()),
+ self.adm.events[id_event].number_of_guests,
+ self.adm.events[id_event].name)
- # Attend
- html_message += "
"
- html_message += self.messages['event_participants_attend'];
+ # Attend
+ html_message += "
"
+ html_message += self.messages['event_participants_attend'];
- # Loop through fetched participants
- html_message += "
"
+ # Loop through fetched participants
+ html_message += ""
- for member in self.adm.events[id_event].getAllAttend():
- html_message += "- "
- html_message += member[1].username
- html_message += "
"
+ for member in self.adm.events[id_event].getAllAttend():
+ html_message += "- "
+ html_message += member[1].username
+ html_message += "
"
- html_message += "
"
+ html_message += "
"
- # Maybe
- html_message += self.messages['event_participants_maybe'];
+ # Maybe
+ html_message += self.messages['event_participants_maybe'];
- # Loop through fetched participants
- html_message += ""
+ # Loop through fetched participants
+ html_message += ""
- for member in self.adm.events[id_event].getAllMaybe():
- html_message += "- "
- html_message += member[1].username
- html_message += "
"
+ for member in self.adm.events[id_event].getAllMaybe():
+ html_message += "- "
+ html_message += member[1].username
+ html_message += "
"
- html_message += "
"
+ html_message += "
"
- # Not attend
- html_message += self.messages['event_participants_not_attend'];
+ # Not attend
+ html_message += self.messages['event_participants_not_attend'];
- # Loop through fetched participants
- html_message += ""
+ # Loop through fetched participants
+ html_message += ""
- for member in self.adm.events[id_event].getAllNotAttend():
- html_message += "- "
- html_message += member[1].username
- html_message += "
"
+ for member in self.adm.events[id_event].getAllNotAttend():
+ html_message += "- "
+ html_message += member[1].username
+ html_message += "
"
- html_message += "
"
+ html_message += "
"
- room.send_html(html_message)
+ room.send_html(html_message)
+ except KeyError:
+ room.send_html(self.messages['unknown_event'])
def chat_callback(self, room, event):
room.send_text("Chat")