Skip to content

Fix UnboundLocalError on timestamps in _retrieve_segment error path - #13

Open
SAY-5 wants to merge 1 commit into
BUTSpeechFIT:mainfrom
SAY-5:fix-timestamps-unbound
Open

Fix UnboundLocalError on timestamps in _retrieve_segment error path#13
SAY-5 wants to merge 1 commit into
BUTSpeechFIT:mainfrom
SAY-5:fix-timestamps-unbound

Conversation

@SAY-5

@SAY-5 SAY-5 commented Jul 22, 2026

Copy link
Copy Markdown

Fixes #12. timestamps was only assigned in the else branch of _retrieve_segment, so hitting the segment_offset <= 0 error path from the timestamped-segments branch raised UnboundLocalError instead of the intended ValueError. Moved the assignment above the branch split so the diagnostic message works either way.

Signed-off-by: Sai Asish Y <say.apm35@gmail.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.

_retrieve_segment: UnboundLocalError on timestamps masks intended ValueError when segment_offset <= 0

1 participant