From 96f803f5d98e791a8dc856d0651116f0bf1a44a8 Mon Sep 17 00:00:00 2001 From: Michele Bigi Date: Sun, 16 Aug 2026 13:22:58 +0200 Subject: [PATCH] Fix ESP32-S31-WROOM-3 symbol failing to load in KiCad The easyeda2kicad.py-generated file had an unquoted URL as the (generator ...) value: '(generator https://github.com/uPesy/...)'. Bare/unquoted s-expression tokens can't contain ':' or '/', which broke KiCad's parser and made the whole library silently fail to load (the symbol was present on disk and correctly registered in fp/sym-lib-table, but invisible in KiCad). Wrapped the value in quotes. Also added a check_library.py rule to catch this class of error (an unquoted generator value containing ':' or '/') automatically going forward. --- scripts/check_library.py | 8 ++++++++ symbols/microcontrollers/ESP32-S31-WROOM-3.kicad_sym | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/check_library.py b/scripts/check_library.py index f991446..b9f6046 100644 --- a/scripts/check_library.py +++ b/scripts/check_library.py @@ -119,6 +119,14 @@ def check_symbols(report: Report) -> list[tuple[str, Path]]: if not parens_balanced(text): report.error(f"[SYM] {path.relative_to(ROOT)}: unbalanced parentheses") + gen_m = re.search(r'\(generator\s+([^\s")]+)', text) + if gen_m and re.search(r'[:/]', gen_m.group(1)): + report.error( + f"[SYM] {path.relative_to(ROOT)}: unquoted '(generator {gen_m.group(1)})' " + f"contains ':' or '/' -- this breaks KiCad's parser and silently makes the " + f"whole library fail to load; wrap the value in double quotes" + ) + digest = lc.sha256_file(path) if digest in seen_hash: report.warn( diff --git a/symbols/microcontrollers/ESP32-S31-WROOM-3.kicad_sym b/symbols/microcontrollers/ESP32-S31-WROOM-3.kicad_sym index e805df4..4e69fb9 100644 --- a/symbols/microcontrollers/ESP32-S31-WROOM-3.kicad_sym +++ b/symbols/microcontrollers/ESP32-S31-WROOM-3.kicad_sym @@ -1,6 +1,6 @@ (kicad_symbol_lib (version 20211014) - (generator https://github.com/uPesy/easyeda2kicad.py) + (generator "https://github.com/uPesy/easyeda2kicad.py") (symbol "ESP32-S31-WROOM-3_C9900281993" (in_bom yes)