|
from owlready2 import *
onto = get_ontology("file://C:/Users/stef info/Downloads/test.owl").load()
countries=onto.search(type=onto.Country)
countries
I used to type this and start to manipulate the ontology But today this error appears : countries=onto.search(type=onto.Country)
countries
Traceback (most recent call last):
File "C:\Users\stef info\Anaconda3\lib\site-packages\IPython\core\formatters.py", line 702, in __call__
printer.pretty(obj)
File "C:\Users\stef info\Anaconda3\lib\site-packages\IPython\lib\pretty.py", line 402, in pretty
return _repr_pprint(obj, self, cycle)
File "C:\Users\stef info\Anaconda3\lib\site-packages\IPython\lib\pretty.py", line 697, in _repr_pprint
output = repr(obj)
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\util.py", line 139, in __repr__
list.__init__(self, self._populate())
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\triplelite.py", line 1457, in <genexpr> return (self.world._get_by_storid(o) for (o,) in self.world.graph.execute(sql, params).fetchall())
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\namespace.py", line 537, in _get_by_storid
return self._load_by_storid(storid, full_iri, main_type, main_onto, default_to_none)
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\namespace.py", line 557, in _load_by_storid
Class = self._get_by_storid(obj, None, ThingClass, main_onto)
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\namespace.py", line 537, in _get_by_storid
return self._load_by_storid(storid, full_iri, main_type, main_onto, default_to_none)
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\namespace.py", line 592, in _load_by_storid
full_iri = full_iri or self._unabbreviate(storid)
File "C:\Users\stef info\Anaconda3\lib\site-packages\owlready2\triplelite.py", line 489, in _unabbreviate_dict
return self._unabbreviate_d[storid]
KeyError: 307
|