Skip to content

_on_sample_finished: unchecked results[0], private _posterior write, over-broad exception swallow #321

@rozyczko

Description

@rozyczko

Source: EasyReflectometryApp/Backends/Py/analysis.py:545-562 — DEEP_ANALYSIS.md §5 item 10 (and §3.2)

_on_sample_finished does posterior = results[0] without checking the list is non-empty, and assigns into the logic object's private self._bayesian_logic._posterior instead of giving Bayesian a setter.

The surrounding try/except Exception: logger.exception(...) swallows the resulting IndexError, so a malformed worker result is logged-and-ignored, leaving the UI in a "finished, no result" limbo.

Fix: Guard against empty results, add a proper Bayesian.posterior setter, and narrow the exception handling so genuine result errors surface to the UI.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions