Hi,
thanks for looking into it.
my colleague helped me to reproduce the issue. Please try this
onto = owlready2.get_ontology('
http://test.org/test.owl')
with onto:
class A(owlready2.Thing): pass
class B(owlready2.Thing): pass
class C(owlready2.Thing): pass
A.equivalent_to = [owlready2.Not(B)]
print(A.INDIRECT_equivalent_to)
C.equivalent_to = [A]
gives this stack trace on my try
Traceback (most recent call last):
File "test.py", line 12, in <module>
C.equivalent_to = [A]
File "owlready2/entity.py", line 574, in __setattr__
super().__setattr__(attr, value)
File "owlready2/entity.py", line 232, in __setattr__
type.__setattr__(Class, attr, value)
File "owlready2/entity.py", line 188, in set_equivalent_to
def set_equivalent_to(Class, value): Class.equivalent_to.reinit(value)
File "owlready2/util.py", line 76, in reinit
def reinit(self, l): old = list(self); super().__init__(l) ; self._callback(self._obj, old)
File "owlready2/entity.py", line 219, in _class_equivalent_to_changed
for x2 in x.equivalent_to._indirect: x2._equivalent_to._indirect = None
File "owlready2/class_construct.py", line 117, in __getattr__
return super().__getattribute__(attr)
AttributeError: 'Not' object has no attribute '_equivalent_to'