Skip to content

Fix Eagle/Fusion crash when a design rule param is missing or duplicated - #586

Merged
qu1ck merged 1 commit into
openscopeproject:masterfrom
DominikPalo:fix-eagle-logger-warning
Oct 6, 2026
Merged

qu1ck merged 1 commit into
openscopeproject:masterfrom
DominikPalo:fix-eagle-logger-warning

Conversation

@DominikPalo

Copy link
Copy Markdown
Contributor

FusionEagleParser._parse_param_length reads the rlMinViaOuter and mlViaStopLimit design rule params. It is meant to log a warning and fall back to a default when a param is missing, or to use the first occurrence when it is listed more than once. Both paths called self.logger.warning(...), but the project's ibom.Logger wrapper only defines info, error and warn (warn is what the other 11 call sites in the repo use). Instead of warning, both cases crashed:

AttributeError: 'Logger' object has no attribute 'warning'

This affects any .brd/.fbrd whose design rules don't include those params, e.g. older or hand-edited files and some exports.

This change switches both calls to self.logger.warn(...). I did this instead of adding a warning alias to Logger to keep the logger API as it is.

Testing

Ran the CLI (generate_interactive_bom in CLI mode, which uses ibom.Logger(cli=True)) on three Eagle test boards:

Board master this PR
Both params present BOM generated BOM generated (unchanged)
Both params missing AttributeError traceback WARNING rlMinViaOuter not found, defaulting to 0, same for mlViaStopLimit, BOM generated
rlMinViaOuter listed twice AttributeError traceback WARNING Multiple rlMinViaOuter found, using first occurrence, BOM generated

🤖 Generated with Claude Code

_parse_param_length called logger.warning, but the project Logger only
provides warn. Boards without rlMinViaOuter or mlViaStopLimit params, or
with one of them listed twice, crashed with AttributeError instead of
logging a warning and using the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@qu1ck
qu1ck merged commit d7a5f93 into openscopeproject:master Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants