Use .get instead of [] for strand classifcations#391
Merged
Conversation
This gets around an uniformative KeyError raised when the run is not on. The missing Keys are not logged (and should be), I have created a separate issue for that.
AAAAA
I should just do this in an IDE
mattloose
requested changes
Jan 29, 2025
Contributor
mattloose
left a comment
There was a problem hiding this comment.
Can you make the message text more explicit w.r.t what has happened?
Closed
agrima2010
pushed a commit
to agrima2010/readfish
that referenced
this pull request
Apr 17, 2026
* .get instead of [] for strand classifcations This gets around an uniformative KeyError raised when the run is not on. The missing Keys are not logged (and should be), I have created a separate issue for that. * Format for pre-commit AAAAA * Forgive me pre-commit for I have sinned I should just do this in an IDE * Edit default for missing classifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gets around an uniformative KeyError raised when the run is not on. The missing Keys are not logged (and should be), I have created a separate issue (#390).
This will make the error that was raised in #389 far more explicit.
In the case that there is no run running, the output now is:
We still need to error log the missing strands before we release this change I think, in case that is changed upstream in MinKNOW.