Skip to content

Comments

Handle ParameterNotFoundError gracefully in runner#709

Open
PavelMakarchuk wants to merge 1 commit intomainfrom
fix-runner-parameter-not-found
Open

Handle ParameterNotFoundError gracefully in runner#709
PavelMakarchuk wants to merge 1 commit intomainfrom
fix-runner-parameter-not-found

Conversation

@PavelMakarchuk
Copy link
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>
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.

1 participant