-
Notifications
You must be signed in to change notification settings - Fork 16
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
TypeError: argument of type 'NoneType' is not iterable #73
Comments
Only when all in
When any in
|
hi Harry, If you (and others in the team) agree, we can implement the fix. Best wishes, Florent |
Agreed with your view that I also think the first fix makes more sense at a glance, but I got to be honest that I have not deep dived into the codes to have a complete understanding. Thank you! |
n worries. We'll review this and introduce a fix. if you do't mind then, we'll ask you to test the fixed branch. is that OK? |
Sure, thanks for your help! |
On a sample, SeroBA encounters a fatal Python error
The relevant part in the code is
seroba/seroba/serotyping.py
Lines 392 to 397 in 8138dc8
I think this piece of code has a logic flaw.
While iterating through
min_keys
in line 393:if key not in mixed_serotype
at line 396 istrue
,mixed_serotype
is therefore set toNone
.if key not in mixed_serotype
at line 396 is effectively turns intoif key not in None
and leads to the Python errorTypeError: argument of type 'NoneType' is not iterable
Fixing this seems to be trivial, but I am not sure which one is the right approach:
min_keys
, only when allkey
s are not inmixed_serotype
, thenmixed_serotype
should be set toNone
min_keys
, when anykey
is not inmixed_serotype
,mixed_serotype
should be set toNone
and exit the loopThe text was updated successfully, but these errors were encountered: