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

Rerun breaks on missing output #1037

Open
donkirkby opened this issue Sep 9, 2020 · 0 comments
Open

Rerun breaks on missing output #1037

donkirkby opened this issue Sep 9, 2020 · 0 comments
Assignees
Labels

Comments

@donkirkby
Copy link
Member

I haven't tried to reproduce this, but here's what I think happened:

  1. Define a container with one or more fixed outputs.
  2. Write the code in the container so that one of those outputs doesn't get created. It has to accept the command line argument, but not actually create a file with that path.
  3. Run the container, and wait for it to finish.
  4. Rerun that run, and wait for the rerun to finish.
  5. Click on the rerun to see the inputs and outputs.

Expected behaviour: the missing output won't be in the list, but the rest of the list should appear.

Actual behaviour: an error occurs:

  File "/home/don/git/Kive/kive/container/views.py", line 300, in get_context_data
    data_entries = [dict(**c._asdict()) for c in dataset_comparisons]
  File "/home/don/git/Kive/kive/container/views.py", line 300, in <listcomp>
    data_entries = [dict(**c._asdict()) for c in dataset_comparisons]
AttributeError: 'NoneType' object has no attribute '_asdict'

Analysis

When we thought through the new optional arguments and output directories, I didn't think of the fact that fixed outputs are not always present. If the container doesn't create the file, then there won't be an output dataset. It looks we either have to check for None in the view, or filter None out of the result in the top comparison. The return type annotations aren't quite right in runutils.py. The DatasetComparison is actually optional in a bunch of places.

@donkirkby donkirkby added the bug label Sep 9, 2020
@donkirkby donkirkby added this to the 0.17 - Collate data sets milestone Sep 9, 2020
@nathanielknight nathanielknight self-assigned this Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants