Open mahdanoura opened 2 weeks ago
I agree that LinkML error messages can be confusing and inconsistent.
Is your work in a code repository? Can you share that?
One of the things I wondering about is whether your hctl
and wot_security
prefixes need to be defined in the schema file that contains the lines you included above.
The code is in this repo and the LinkML schemas are located in the schema directory. The names I provide in the import statements correspond to the schema names and not their prefixes, otherwise those entities are not found. I appreciate the feedback. Thanks
Describe the bug I use the following LinkML snippet, which imports
hctl
andwot_security
as local LinkML yaml files.I noticed LinkML does not like the prefixing to the imports for specifying the
Range
. However, the error messages produced are inconsistent. Forrange: hctl:Link
I get the following error:ValueError: File "thing_description.yaml", line 363, col 16 slot: thing__links - unrecognized range (hctl:Link)
However, for
range: wot_security:SecuritySchemeType
, the error message is completely vague:AttributeError: 'NoneType' object has no attribute 'from_schema'
To Reproduce My environment is as follows:
Expected behavior I expect the error messages for the same problem to be consistent and meaningful, because digging the issue becomes cumbersome.
Code snippets I generate the documents using the python class as follows: