Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadVarsESO silently fails with wrong output names #3

Open
airallergy opened this issue Nov 29, 2024 · 0 comments
Open

ReadVarsESO silently fails with wrong output names #3

airallergy opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@airallergy
Copy link
Owner

From discussion with @shyamamrith.

When a wrong output name is specified, ReadVarsESO will indicate that the output is not found in readvars.audit, but still run successfully with exit code 0, and create a csv file with a single line.

This will lead to an error in the method

sober/sober/_io_managers.py

Lines 546 to 548 in a2548e9

def _record_final(
self, level: AnyCoreLevel, record_dir: Path, uids: AnyUIDs
) -> None:

where next() in
record_rows[i] += next(reader)[1:]

will fail because of reaching the end of iterator.

Unfortunately this is not caught due to multiprocessing plus hidden by the with open() context. But rather, this causes scheduled in

for (job_uid, _), _ in zip(batch, scheduled, strict=True):

to be empty, hence failing the strict zip, which is completely uninformative.

Consider how to provide more informative error message on this.

@airallergy airallergy added the enhancement New feature or request label Nov 29, 2024
@airallergy airallergy self-assigned this Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant