craigtrim / slackbot-helper

Helper Functions for Slackbots
0 stars 0 forks source link

Message Text Extraction Defect #6

Closed craigtrim closed 1 year ago

craigtrim commented 1 year ago
        Total User IDs: 1
2022-11-16 11:37:39,547 : DEBUG : internals.py : send_response() : 41 : Response time: 3 milliseconds
2022-11-16 11:37:39,547 : ERROR : listener_error_handler.py : handle() : 67 : Failed to run listener function (error: 'elements')
Traceback (most recent call last):
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack_bolt\listener\thread_runner.py", line 120, in run_ack_function_asynchronously
    listener.run_ack_function(request=request, response=response)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack_bolt\listener\custom_listener.py", line 50, in run_ack_function
    return self.ack_function(
  File ".\climate_bot\router.py", line 45, in app_mention
    d_event = app_mention_handler(body['event'])
  File "C:\Users\Craig\git\climate\climate-bot\climate_bot\app_mention\bp\app_mention_orchestrator.py", line 125, in handle
    d_event_normalized = normalize_event(
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\__init__.py", line 73, in normalize_event
    return NormalizeIncomingEvent(bot_ids).process(d_event)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\core\bp\normalize_incoming_event.py", line 45, in process
    d_analyzed = self._analyze(d_transformed)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\core\svc\analyze_slack_event.py", line 120, in process
    d_analyzed = self._process(d_event)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\core\svc\analyze_slack_event.py", line 83, in _process
    message_text = self._extract_message_text(d_event)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\core\dmo\message_text_extract.py", line 132, in process
    message_text = self._process(d_event)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slackbot_helper\core\dmo\message_text_extract.py", line 74, in _process
    for inner in element['elements']:
KeyError: 'elements'