Skip to content

Error on attempt to get 'SRU' sgroup name contradicts API documentation #3545

@NadezhdaKatcman

Description

@NadezhdaKatcman

Summary
Inconsistency between api doc and implementation: attempt to get 'SRU' sgroup name gives error while doc says it should work fine

Steps to Reproduce

  1. Create 'SRU' sgroup
  2. Get name of created sgroup

Python script to reproduce the issue:
`mol = indigo.createMolecule()
mol.addAtom("C")

query = indigo.createQueryMolecule()
query.addAtom("C")

matcher = indigo.substructureMatcher(mol)
match = matcher.match(query)

if match:
sgroup = mol.createSGroup("SRU", match, "TEST")
print (f"group created: {sgroup.getSGroupName()}")`

Actual behavior
Attempt to get name of the created sgroup throws error:

print (f"grup created: {sgroup.getSGroupName()}")
File "...\Python313\site-packages\indigo\indigo\indigo_object.py", line 1970, in getSGroupName
return IndigoLib.checkResultString(self._lib().indigoGetSGroupName(self.id))
File "...\Python313\site-packages\indigo\indigo\indigo_lib.py", line 1178, in checkResultString
return IndigoLib.checkResultPtr(result, exception_class).decode()
File "...\Python313\site-packages\indigo\indigo\indigo_lib.py", line 1171, in checkResultPtr
raise exception_class(IndigoLib.lib.indigoGetLastError())
indigo.indigo.indigo_exception.IndigoException: core: is not a superatom

Expected behavior
No inconsistency between behavior described in documentation and actual behavior of getSGroupName for 'SRU' sgroups

Environment details:

  • indigo: 1.40.0
  • python 3.13
  • Windows 11 Enterprise. Version 25H2

Attachments
From documentation:
Image

Additional context

  • for 'SUP' sgroups getting group name works fine

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions