Skip to content

Error when adding a synonym type to a synonym #71

Closed
@daumkep

Description

@daumkep

Hi,

I try to add a synonym type to a synonym like this:
syn.type= exactSynType

and the following error message appears. As far as I understood, synonymtypedefs is a Nanoset (not a Hash with type_.id being the key), so 'type_.id not in synonyms' will always be True. Is this an error, or do I something wrong?

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pronto\synonym.py in type(self, type_)
184 synonyms = self.ontology.metadata.synonymtypedefs
185 if type
is not None and type_.id not in synonyms:
--> 186 raise ValueError(f"undeclared synonym type: {type_.id}")
187 self.data().type = type.id if type_ is not None else None

Thanks and all the best
Philipp

Metadata

Metadata

Assignees

Labels

bugIssues or pull requests that specify a bug.fixedIssues which bug was fixed in subsequent commits.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions