linkml / linkml-runtime

Runtime support for linkml generated models
https://linkml.io/linkml/
Creative Commons Zero v1.0 Universal
22 stars 21 forks source link

`AttributeError: type object 'ConstraintType' has no attribute 'UnmappedTypeConstraint'` #293

Closed mih closed 6 months ago

mih commented 6 months ago

I am debugging a potentially faulty data model, and ran linkml-normalize on an example. This resulted in the exception

AttributeError: type object 'ConstraintType' has no attribute 'UnmappedTypeConstraint'

It is caused by the following line.

https://github.com/linkml/linkml-runtime/blob/0c55320d243e57903d0f1aaf25aa1d9a786dd986/linkml_runtime/processing/referencevalidator.py#L873

It was added in f5979215a060e77b51294fa8918612833b9c880b

It appears that the corresponding permissible value has never been part of the ConstraintType enum.

https://github.com/linkml/linkml-runtime/blob/0c55320d243e57903d0f1aaf25aa1d9a786dd986/linkml_runtime/processing/validation_datamodel.yaml#L220C3-L220C17

mih commented 6 months ago

Just saw #218. Sorry