Skip to content

add a check in parsing that some regex search was successful before accessing it#2

Merged
svigerske merged 3 commits into
mainfrom
fix-parse
May 22, 2026
Merged

add a check in parsing that some regex search was successful before accessing it#2
svigerske merged 3 commits into
mainfrom
fix-parse

Conversation

@svigerske
Copy link
Copy Markdown
Member

We had some corrupted .out files where ipet (in rubberband) failed with some exception in the line

 data = [self.convertToFloat(misc.numericExpression.search(line, colonidx + 1).group(0))]

misc.numericExpression.search(line, colonidx + 1) returned None, and then None.group() isn't good.
The line to parse was

 Gap First Sol.   :   infinite

But I guess its the corruption of the out file that lead to an issue here now.

This PR adds a check that this isn't None.

I also had a problem to run the ipet-parse script, because logger wasn't defined in the process_one_outfiles_group() function.

@svigerske svigerske requested a review from stephenjmaher May 21, 2026 15:05
@svigerske svigerske self-assigned this May 21, 2026
@stephenjmaher
Copy link
Copy Markdown
Collaborator

This looks good to me.

@svigerske svigerske merged commit 0246d11 into main May 22, 2026
1 check passed
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