Problems with slack sending files as of 2023.10

in 2023.9 (and long before), I’ve had the following working:

- id: '169515xxxxxx'
  alias: Shop Upload
  description: ''
  - platform: mqtt
    topic: security-cam/shop/#
  condition: []
  - delay:
      hours: 0
      minutes: 1
      seconds: 15
      milliseconds: 0
  - service: notify.xxxx
      message: Uploaded Video
      title: Motion below deck
      target: '#testing'
          path: /media/shop/recording_{{ trigger.payload }}.mp4

However since 2023.10.0 and .1 the “attachment” of a file in the message (i.e. notifications work, if I remove “data” from the notification")

yields the the following error:

2023-10-10 18:41:31.837 ERROR (MainThread) [homeassistant.components.automation.moss_video_snapshot_and_video_upload] Shop Video Snapshot and Video Upload: Parallel action at step 4: parallel 1: Error executing script. Unexpected error for call_service at pos 1: Can not serialize value type: <class 'NoneType'>
 headers: {}
 value: None
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 508, in update_body_from_data
    body = payload.PAYLOAD_REGISTRY.get(body, disposition=None)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 118, in get
    raise LookupError()

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 145, in _gen_form_data
    part = payload.get_payload(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 71, in get_payload
    return PAYLOAD_REGISTRY.get(data, *args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 118, in get
    raise LookupError()

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/", line 704, in _async_call_service_step
    response_data = await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/", line 666, in _async_run_long_action
    return long_task.result()
  File "/usr/src/homeassistant/homeassistant/", line 2012, in async_call
    response_data = await coro
  File "/usr/src/homeassistant/homeassistant/", line 2049, in _execute_service
    return await target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/notify/", line 264, in _async_notify_message_service
    await self.async_send_message(**kwargs)
  File "/usr/src/homeassistant/homeassistant/components/slack/", line 323, in async_send_message
    return await self._async_send_local_file_message(
  File "/usr/src/homeassistant/homeassistant/components/slack/", line 163, in _async_send_local_file_message
    await self._client.files_upload(
  File "/usr/local/lib/python3.11/site-packages/slack/web/", line 213, in _send
    res = await self._request(
  File "/usr/local/lib/python3.11/site-packages/slack/web/", line 244, in _request
    async with session.request(http_verb, api_url, **req_args) as res:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 508, in _request
    req = self._request_class(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 313, in __init__
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 510, in update_body_from_data
    body = FormData(body)()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 170, in __call__
    return self._gen_form_data()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/", line 149, in _gen_form_data
    raise TypeError(
TypeError: Can not serialize value type: <class 'NoneType'>
 headers: {}
 value: None

Uncertain if the slack api changed with the 2023.10, or something else?

If I downgrade back to 2023.9.3 all works well again.

I have the exact same fault.
Any updates on a solution?

At least I’m not completely crazy then :slight_smile:

When I put slack integration in debug…

it looks ALOT like:

I just put this in:

A feature recently added to the slack integration (support for slack replies) introduced the bug. It’s been fixed and should be in 2023.10.02.

My apologies for the hassle it’s created. Given the small nature of the fix you may have success applying the fix manually in the meantime. (I can’t speak to whether that’s a supported method for HA though)