Skip to content

Object of type DockerMount is not JSON serializable #6469

@edent

Description

@edent

Describe the issue you are experiencing

Multiple people are reporting that a recent Supervisor update has broken their HA installation.

See #6474 and https://community.home-assistant.io/t/update-to-2026-1-0-and-ui-no-longer-loads/971893

I think this was introduced in d23bc29

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Steps to reproduce the issue

  1. Install or Update to the latest version.
  2. HA won't load
  3. ha core check returns Error: Object of type DockerMount is not JSON serializable

See #6474 (comment)

Anything in the Supervisor logs that might be useful for us?

2026-01-10 10:47:06.058 INFO (SyncWorker_5) [supervisor.docker.manager] Runing command 'python3 -m homeassistant -c /config --script check_config' on ghcr.io/home-assistant/qemux86-64-homeassistant:2025.10.4
2026-01-10 10:47:06.059 ERROR (MainThread) [supervisor.jobs] Unhandled exception: Object of type DockerMount is not JSON serializable
Traceback (most recent call last):
  File "/usr/src/supervisor/supervisor/jobs/decorator.py", line 299, in wrapper
    return await method(obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/supervisor/supervisor/docker/homeassistant.py", line 215, in execute_command
    return await self.sys_run_in_executor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<28 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/manager.py", line 638, in run_command
    container = self.dockerpy.containers.run(
        image_with_tag,
    ...<4 lines>...
        **kwargs,
    )
  File "/usr/local/lib/python3.13/site-packages/docker/models/containers.py", line 876, in run
    container = self.create(image=image, command=command,
                            detach=detach, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/docker/models/containers.py", line 935, in create
    resp = self.client.api.create_container(**create_kwargs)
  File "/usr/local/lib/python3.13/site-packages/docker/api/container.py", line 440, in create_container
    return self.create_container_from_config(config, name, platform)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/docker/api/container.py", line 456, in create_container_from_config
    res = self._post_json(u, data=config, params=params)
  File "/usr/local/lib/python3.13/site-packages/docker/api/client.py", line 303, in _post_json
    return self._post(url, data=json.dumps(data2), **kwargs)
                                ~~~~~~~~~~^^^^^^^
  File "/usr/local/lib/python3.13/json/__init__.py", line 235, in dumps
    return _default_encoder.encode(obj)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/usr/local/lib/python3.13/json/encoder.py", line 202, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/lib/python3.13/json/encoder.py", line 263, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.13/json/encoder.py", line 182, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
                    f'is not JSON serializable')
TypeError: Object of type DockerMount is not JSON serializable

System information

arch: amd64
audio_input: null
audio_output: null
backups_exclude_database: false
boot: true
duplicate_log_file: false
image: ghcr.io/home-assistant/qemux86-64-homeassistant
ip_address: 172.30.32.1
machine: qemux86-64
port: 8123
ssl: true
update_available: true
version: 2025.10.4
version_latest: 2026.1.0
watchdog: true

Supervisor diagnostics

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions