I want to parse an InChI string to a pybel.Molecule. I can understand that this may fail but I believe it should be handled more transparently rather than terminating my program.
Actual Behavior
When I run below code, I get the following error.
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Steps to Reproduce
from openbabel import pybel
molecule = pybel.readstring(
"inchi",
"InChI=1S/C26H37N7O19P3S/c1-26(2,20(37)23(38)29-6-5-15(34)28-7-8-56-25(39)13-3-4-16(35)49-13)10-48-55(45,46)52-54(43,44)47-9-14-19(51-53(40,41)42)18(36)24(50-14)33-12-32-17-21(27)30-11-31-22(17)33/h3-4,11-12,14,18-20,24,36-37H,5-10H2,1-2H3,(H,28,34)(H,29,38)(H,43,44)(H,45,46)(H2,27,30,31)(H2,40,41,42)/t14-,18?,19?,20-,24-/m0/s1/CRV:16.5",
)
Environment Information
conda info
Open Babel version 3.0.0
Expected Behavior
I want to parse an InChI string to a
pybel.Molecule
. I can understand that this may fail but I believe it should be handled more transparently rather than terminating my program.Actual Behavior
When I run below code, I get the following error.
Steps to Reproduce