You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run cr-filter-operators tutorial.sqlite tutorial.toml
Run cosmic-ray exec tutorial.toml tutorial.sqlite
Run cosmic-ray dump tutorial.sqlite
Observe error
cosmic_ray/cli.py", line 192, in result_to_dict
d["test_outcome"] = d["test_outcome"].value
AttributeError: 'NoneType' object has no attribute 'value'
The problem comes about because the filtered jobs are skipped, so have no test_outcome. This could probably be fixed with a simple if statement in the line above to test whether d["test_outcome"] is not None before trying to access the value, although that might then pass the problem further down the line.
A fix is not a particularly high priority for me, but I thought I'd report the issue, and would be happy to attempt a pull request if that's something you're interested in.
The text was updated successfully, but these errors were encountered:
Summary
Dumping a database with filtered operators gives
AttributeError: 'NoneType' object has no attribute 'value'
because skipped jobs have no test outcome.Steps to reproduce
ROOT/mod.py
with contentROOT/test_mod.py
with contentROOT/tutorial.toml
with contentcosmic-ray init tutorial.toml tutorial.sqlite
cr-filter-operators tutorial.sqlite tutorial.toml
cosmic-ray exec tutorial.toml tutorial.sqlite
cosmic-ray dump tutorial.sqlite
The problem comes about because the filtered jobs are skipped, so have no
test_outcome
. This could probably be fixed with a simpleif
statement in the line above to test whetherd["test_outcome"] is not None
before trying to access the value, although that might then pass the problem further down the line.A fix is not a particularly high priority for me, but I thought I'd report the issue, and would be happy to attempt a pull request if that's something you're interested in.
The text was updated successfully, but these errors were encountered: