Skip to content

fix: catch SamplesException alongside FitException in database samples guide (PyAutoFit#1486) - #19

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/stored-sample-guard-catch-migration
Aug 19, 2026
Merged

fix: catch SamplesException alongside FitException in database samples guide (PyAutoFit#1486)#19
Jammy2211 merged 1 commit into
mainfrom
feature/stored-sample-guard-catch-migration

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

PyAutoLabs/PyAutoFit#1504 (merged) changed the user-visible type for stored-sample reconstruction failures from ModelParameterException (a FitException/ValueError) to a typed af.exc.SamplesException. This guide's errors_at_*_sigma harness guard caught only FitException, so once the next autofit release lands it would miss the new type. Widens the catch to (af.exc.FitException, af.exc.SamplesException) in the script and its generated notebook twin — the only affected catch site across all workspace repos (full sweep on PyAutoFit#1486).

Scripts Changed

  • scripts/dataset_1d/advanced/database/examples/samples.py — catch tuple widened (line 286)
  • notebooks/dataset_1d/advanced/database/examples/samples.ipynb — same change in the notebook twin

Test Plan

  • py_compile on the script; notebook JSON validated
  • Both exception classes verified present in currently released autofit, so no pending-release hold is needed (same rationale as autogalaxy_workspace#210)

Generated by the PyAutoLabs agent workflow.

…s guide (PyAutoFit#1486)

PyAutoFit#1504 changed the user-visible type for stored-sample
reconstruction failures from ModelParameterException (a FitException/
ValueError) to a typed SamplesException. This guide's errors_at_*_sigma
harness guard caught only FitException, so it would miss the new type
once that release lands. Both classes exist in released autofit, so this
needs no pending-release hold.

Co-Authored-By: Claude Fable 5 <[email protected]>
@Jammy2211
Jammy2211 merged commit 9099102 into main Aug 19, 2026
@Jammy2211
Jammy2211 deleted the feature/stored-sample-guard-catch-migration branch August 19, 2026 20:41
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