Description
When using the multi_component_hydrogen_bond_propensity_report.py I found that
ascores[a.label] = [round((coordination_scores.predictions_for_label(a.label, 'a')[1])[k], 3)
raises 'NoneType' object is not subscriptable
It may look like some problem with the script, but on a deeper investigation,
coordination_scores.predictions_for_label(a.label, 'a')
returns None type. The label in question is O1_B.
Investigating a little I discovered that in coordination_scores._predictions
the prediction with O1_B was present.
(('O1_B of carboxylate (a)', 0),
('0.146488', 0),
('0.577361', 1),
('0.259616', 0),
('0.0149453', 0),
('0.0015899', 0)),
It seems like
if not self._predictions:
return None
In the CrystalDescriptors
Class is somehow returning None, as the other return should return a Tuple, even if it is empty. I don't know the type of the coordination_scores._predictions
tuple like object, but if it implemented an __bool__
like function to define a different default behaviour, it could be the source of this problem.
I am having this problem specifically doing the multi_component_HBP of FUTWOI37 and FOXLUA. After updating to the 3.1.0, the problem that R couldn't run returned (installed with conda). I also found the same problem in windows (installed with pip). So, the fix I was using could be the source of this problem even if I don't see how. Furthermore, it works fine for every other pair of FOXLUA-->Coformer but not FUTWOI37. So, I would like to know if you can reproduce this potential bug. Investigating the code of the API that isn't compiled, I could only come to the conclusions presented above.