|
Hi friends, thanks for taking the time to resolve the issueI. Attach the code and error that it throws me
Code : from owlready2 import *
import os
onto = get_ontology("file://C:/Users/achev/Documents/Carro.owl")
onto.load()
n_classes = len(list(onto.classes()))
print(n_classes)
Error:
File "c:/Users/achev/Desktop/Proyecto de grado/Python/prueba.py", line 4, in onto = get_ontology("file://C:/Users/achev/Documents/Carro.owl").load() File "C:\ProgramData\Anaconda3\lib\site-packages\owlready2\namespace.py", line 810, in load if self.world.graph.indexed: self._load_properties() File "C:\ProgramData\Anaconda3\lib\site-packages\owlready2\namespace.py", line 849, in _load_properties raise TypeError("'%s' belongs to more than one entity types (cannot be both a property and a class/an individual)!" % Prop.iri)
|