Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"unknown_conforms_to" error while running pizza01-toppings example in https://linkml.io/linkml-owl/tutorial/pizza01/ #42

Closed
samsontu opened this issue May 3, 2024 · 0 comments · Fixed by #43

Comments

@samsontu
Copy link

samsontu commented May 3, 2024

After copying the pizza01-toppings-model.yaml and pizza01-toppings-data.yaml files from https://linkml.io/linkml-owl/tutorial/pizza01/, running

linkml-data2owl -s pizza01-toppings-model.yaml pizza01-toppings-data.yaml -o pizza01-toppings.ofn
Result in:
ERROR:root:Did not find unknown_conforms_to in PizzaTopping slots = []
Traceback (most recent call last):
File "/Users/tu/opt/anaconda3/bin/linkml-data2owl", line 8, in
sys.exit(cli())
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 822, in cli
doc = dumper.dumps(element, schemaview=sv, output_type=output_type)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 185, in dumps
doc = self.to_ontology_document(element, schema, iri=iri)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 165, in to_ontology_document
self.transform(e1, schema)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 254, in transform
raise ValueError(f'Lookup slot in {c.name} failed for {k} // element={element}')
ValueError: Lookup slot in PizzaTopping failed for unknown_conforms_to // element=PizzaTopping(id='pizza:FishTopping', label='fish topping', conforms_to='PizzaTopping', subClassOf='pizza:PizzaTopping')

Taking out the conforms-to statements in pizza01-toppings-data.yaml and running

linkml-data2owl -C PizzaTopping -s pizza01-toppings-model.yaml pizza01-toppings-data-woconforms.yaml -o pizza01-toppings.ofn
Result in:
ERROR:root:Did not find unknown_conforms_to in PizzaTopping slots = []
Traceback (most recent call last):
File "/Users/tu/opt/anaconda3/bin/linkml-data2owl", line 8, in
sys.exit(cli())
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 822, in cli
doc = dumper.dumps(element, schemaview=sv, output_type=output_type)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 185, in dumps
doc = self.to_ontology_document(element, schema, iri=iri)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 165, in to_ontology_document
self.transform(e1, schema)
File "/Users/tu/opt/anaconda3/lib/python3.9/site-packages/linkml_owl/dumpers/owl_dumper.py", line 254, in transform
raise ValueError(f'Lookup slot in {c.name} failed for {k} // element={element}')
ValueError: Lookup slot in PizzaTopping failed for unknown_conforms_to // element=PizzaTopping(id='pizza:FishTopping', label='fish topping', conforms_to='PizzaTopping', subClassOf='pizza:PizzaTopping')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant