Skip to content

Handle ParameterNotFoundError gracefully in runner#709

Merged
MaxGhenis merged 1 commit intomainfrom
fix-runner-parameter-not-found
Mar 29, 2026
Merged

Handle ParameterNotFoundError gracefully in runner#709
MaxGhenis merged 1 commit intomainfrom
fix-runner-parameter-not-found

Conversation

@PavelMakarchuk
Copy link
Copy Markdown
Collaborator

Summary

  • Runner crashed on PA records (2024) because state_eitc triggers a ParameterNotFoundError for pa_eitc.match
  • The error handler only caught "does not exist" but not "was not found" — now catches both
  • Matches exe.py behavior: returns 0 for missing parameters instead of crashing

Context

Found while testing the runner as a replacement for exe.py in response to #706 (speed issue). Without this fix, any input containing Pennsylvania records for 2024 crashes the runner.

Test plan

  • Tested all 51 states individually in a fresh venv with policyengine-us 1.570.7
  • Tested 1000 records across all states — completes successfully

🤖 Generated with Claude Code

The runner crashed on PA records for 2024 because state_eitc triggers
a ParameterNotFoundError for pa_eitc.match. The error handler only
caught "does not exist" but not "was not found". Now catches both,
matching exe.py behavior of returning 0 for missing parameters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis merged commit d999de5 into main Mar 29, 2026
7 checks passed
@MaxGhenis MaxGhenis deleted the fix-runner-parameter-not-found branch March 29, 2026 22:32
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