Menu

#632 Iron Python problems with OBElementTable.GetName()

2.2.x
open
5
2012-10-23
2010-08-26
No

Dan Kimblering, from openbabel-scripting:

"Hi,

I just started using OpenBabel with Iron Python. I am new to each so i'm
not sure if this a bug or user error.

When I try to get an element name or symbol using:

import clr
clr.AddReference("OBDotNet.dll")
import OpenBabel as ob

etab = ob.OBElementTable()
name = str(etab.GetName(8))
print(name)

I get an error:
Message: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.

When I try to get a numeric value such as mass, everything works fine."

Discussion