craigtrim / slackbot-helper

Helper Functions for Slackbots
0 stars 0 forks source link

Image Alt Text is Mandatory in Slack Blocks #7

Closed craigtrim closed 1 year ago

craigtrim commented 1 year ago
2022-11-16 13:24:18,736 : ERROR : listener_error_handler.py : handle() : 67 : Failed to run listener function (error: The request to the Slack API failed.
The server responded with: {'ok': False, 'error': 'invalid_blocks', 'errors': ['must provide a string [json-pointer:/blocks/0/accessory/alt_text]'], 'response_metadata': {'messages': ['[ERROR] must provide a string [json-pointer:/blocks/0/accessory/alt_text]']}})
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 49, in app_mention
    client.chat_postMessage(
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack\web\client.py", line 1077, in chat_postMessage
    return self.api_call("chat.postMessage", json=kwargs)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack\web\base_client.py", line 150, in api_call
    return self._sync_send(api_url=api_url, req_args=req_args)
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack\web\base_client.py", line 241, in _sync_send
    return self._urllib_api_call(
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack\web\base_client.py", line 369, in _urllib_api_call
    return SlackResponse(
  File "C:\Users\Craig\AppData\Local\pypoetry\Cache\virtualenvs\climate-bot-WzljwpJV-py3.8\lib\site-packages\slack\web\slack_response.py", line 194, in validate
    raise e.SlackApiError(message=msg, response=self)
slack.errors.SlackApiError: The request to the Slack API failed.
The server responded with: {'ok': False, 'error': 'invalid_blocks', 'errors': ['must provide a string [json-pointer:/blocks/0/accessory/alt_text]'], 'response_metadata': {'messages': ['[ERROR] must provide a string [json-pointer:/blocks/0/accessory/alt_text]']}}