From 1d179c2506d9f8cb6a6da557db53c9c88dfbc56c Mon Sep 17 00:00:00 2001 From: lhj <403133128@qq.com> Date: Fri, 4 Dec 2026 00:47:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(spatial):=20pcbnew=20=E7=9A=84=20GetParent?= =?UTF-8?q?=20=E4=B8=8D=E6=98=AF=E5=B0=81=E8=A3=85=EF=BC=8C=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E6=94=B9=E7=94=A8=20GetParentFootprint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spatial/providers/kicad_board.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spatial/providers/kicad_board.py b/spatial/providers/kicad_board.py index 9acc714..9dff44f 100644 --- a/spatial/providers/kicad_board.py +++ b/spatial/providers/kicad_board.py @@ -30,8 +30,10 @@ def _pads(board): def _ref(pad) -> str: + """Footprint reference. ``GetParent()`` returns a container, not a footprint + (measured on KiCad 10.0.6), so the accessor is ``GetParentFootprint``.""" try: - return pad.GetParent().GetReference() + return pad.GetParentFootprint().GetReference() except Exception: return "?"