|
Hi,
When i'm iterating on a value property, i get this error on datatype DateTimeStamp.
Traceback (most recent call last):
File "parsing_ontology.py", line 126, in <module> for value in p[i]:
File "/usr/lib/python3.6/site-packages/owlready2/property.py", line 256, in __getitem__
values = getattr(individual, Prop.python_name)
File "/usr/lib/python3.6/site-packages/owlready2/individual.py", line 231, in __getattr__
values = [self.namespace.ontology._to_python(o) for o in self.namespace.world.get_triples_sp(self.storid, Prop.storid)]
File "/usr/lib/python3.6/site-packages/owlready2/individual.py", line 231, in <listcomp> values = [self.namespace.ontology._to_python(o) for o in self.namespace.world.get_triples_sp(self.storid, Prop.storid)]
File "/usr/lib/python3.6/site-packages/owlready2/namespace.py", line 120, in _to_python
elif o.startswith('"'): return from_literal(o)
File "/usr/lib/python3.6/site-packages/owlready2/base.py", line 56, in from_literal
if datatype is None: raise ValueError("Cannot read literal of datatype '%s'!" % l[1:])
ValueError: Cannot read literal of datatype 'x'!
my code is :
for c in onto.classes():
for i in c.instances():
for p in i.get_properties():
for value in p[i]: <== error here
print("-----------------------" + str(p) + " => " + str(value))
Is DataTimeStamp not supported in OWLREADY2 2.0.5 ?
Thanks for your help.
|