Skip to content

Robust CHID parsing #94

@chraibi

Description

@chraibi

This part

with open(smv_file_path, 'r') as infile:
    for line in infile:
        if line.strip() == "CHID":
            chid = infile.readline().strip()
            break

in simulation.py leads in my case to this error:

Image

The failure happens because chid is never set while parsing the SMV (for some reason).

Maybe this function can be enhanced so that in this case the function returns an error.

A bit like:

CHID = None
# function above
if not chid:
    raise ValueError(f"Could not determine CHID from {smv_file_path}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions