kicad-python raises a ValueError on board.get_footprints()

Summary

On some boards, board.get_footprints() raises a ValueError:

Traceback (most recent call last):
  File "/Users/mairas/src/hatlabs/breakneck/./crash_test.py", line 7, in <module>
    footprints = board.get_footprints()
  File "/Users/mairas/src/hatlabs/breakneck/.venv/lib/python3.13/site-packages/kipy/board.py", line 398, in get_footprints
    for item in self.get_items(types=[KiCadObjectType.KOT_PCB_FOOTPRINT])
                ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/mairas/src/hatlabs/breakneck/.venv/lib/python3.13/site-packages/kipy/board.py", line 373, in get_items
    [unwrap(item) for item in self._kicad.send(command, GetItemsResponse).items]
     ~~~~~~^^^^^^
  File "/Users/mairas/src/hatlabs/breakneck/.venv/lib/python3.13/site-packages/kipy/board_types.py", line 2100, in unwrap
    concrete = unpack_any(message)
  File "/Users/mairas/src/hatlabs/breakneck/.venv/lib/python3.13/site-packages/kipy/util/proto.py", line 63, in unpack_any
    raise ValueError(f"Can't unpack {object.type_url}.  Incompatible change on KiCad side?") from None
ValueError: Can't unpack type.googleapis.com/kiapi.board.types.FootprintInstance.  Incompatible change on KiCad side?

On some other boards, this works fine.

Reproduction steps

This test code:

#!/usr/bin/env python

import kipy

kicad = kipy.KiCad()
board = kicad.get_board()
footprints = board.get_footprints()
fp = footprints[0]

print(fp)

This project: HALPI2_2025-02-15.zip

Open project. Run script.

Version Info

Please include all the requested information below. If you do not, your issue may be closed.

  • Python version: Python 3.13.0 (main, Oct 7 2024, 23:47:22) [Clang 18.1.8 ]
  • kicad-python version: 1550afcb, kicad submodule 744c296f146d296aad5b5182b41c28b3e644894a.

KiCad full version info: Insert the output of kicad-cli version --format about, or the full KiCad version text found in the KiCad About dialog, between the sets of triple backticks below

Application: KiCad arm64 on arm64

Version: 9.0.0-rc3-116-g9930911de6, release build

Libraries:
	wxWidgets 3.2.6
	FreeType 2.13.3
	HarfBuzz 10.2.0
	FontConfig 2.15.0
	libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.63.0

Platform: macOS Sequoia Version 15.2 (Build 24C101), 64 bit, Little endian, wxMac
OpenGL: Apple, Apple M1 Max, 2.1 Metal - 89.3

Build Info:
	Date: Feb 15 2025 02:22:43
	wxWidgets: 3.2.6 (wchar_t,wx containers)
	Boost: 1.87.0
	OCC: 7.8.1
	Curl: 8.7.1
	ngspice: 44.2
	Compiler: Clang 16.0.0 with C++ ABI 1002
	KICAD_IPC_API=ON