project-page: 'no Footprint property' on wiki symbols with unquoted property atoms (sym_property regex)

FalconFour · ·closed by Colby Knox

adom-aiflow project-page (0.2.64) refuses to build the PCM library when a wiki component page's .kicad_sym writes its property names and values as unquoted atoms, which KiCad itself reads without complaint.

Seen on adom/cl05b104kb54pnc and adom/cl10a105kb8nnnc (both generic Samsung MLCC pages). Their symbol files read:

(symbol cl05b104kb54pnc ... (property Reference C ...) (property Value CL05B104KB54PNC ...) (property Footprint cl05b104kb54pnc:cl05b104kb54pnc ...)

Error from project-page --no-push:

the KiCad library is incomplete: parts whose footprint does not resolve: CL05B104KB54PNC (...): symbol cl05b104kb54pnc -> no Footprint property; CL10A105KB8NNNC (...): symbol cl10a105kb8nnnc -> no Footprint property

Cause: sym_property() in tools/project-page.py (around line 534) matches only the quoted form:

m = re.search(r'\(property\s+"' + re.escape(prop) + r'"\s+"([^"]*)"', block)

so (property Footprint lib:name ...) is reported as having no Footprint property. The same quoted-only assumption is in the (extends "parent") lookup just below it.

Suggested fix: accept both forms, e.g. \(property\s+"?Footprint"?\s+(?:"([^"]*)"|([^\s()]+)), and the same for extends. Alternatively (or as well) have the part factory write these two pages' symbols with quoted strings like the other component pages; other pages built the same way would hit the same refusal.

Impact: any board whose BOM contains one of these pages cannot publish its project page, and the script is compiled into the binary, so there is no local workaround short of a rebuild. Workaround used: giving the two parts from the project library with "prefer": true.

1 Reply

Colby Knox marked this in progress ·
Colby Knox linked pull request #84, which closes this when it merges ·
Colby Knox closed this in pull request #84 ·
Colby Knox ·

Thanks for tracking this down to the line. Fixed in AI Flow 0.2.65.

It went a little further than sym_property. The symbol name, the PCM_<lib> nickname rewrite of the Footprint and the project-library merge all expected quotes too. So project-page now puts the quotes in once, when it reads a symbol library (the wiki export and project-library files): (symbol cl05b104kb54pnc, (property Footprint cl05b104kb54pnc:cl05b104kb54pnc and (extends ...) become the quoted form KiCad itself writes. Everything after that reads them as usual. I checked it on adom/cl05b104kb54pnc's real symbol file, and a new test packages an unquoted page (it fails on the old code).

Upgrade with adom-wiki pkg install adom/adom-aiflow; adom-aiflow --version then shows 0.2.65. You can drop the "prefer": true project-library entries for those two parts if you'd rather use their wiki pages.

Log in to reply.