TypeError: metaclass conflict

Posted by cudillal on
URL: http://owlready.306.s1.nabble.com/TypeError-metaclass-conflict-tp2889.html

Hey, I'm trying to embed an ontology using OWL2Vec*, which uses Owlready2, but I'm getting an Owlready2 error when extracting triples from complex axioms:

Traceback (most recent call last):
  File "OWL2Vec-Star/OWL2Vec_Standalone.py", line 59, in <module>
    projection.extractProjection()
  File "/workspace/project/OWL2Vec-Star/owl2vec_star/lib/Onto_Projection.py", line 617, in extractProjection
    self.__extractTriplesFromComplexAxioms__()
  File "/workspace/project/OWL2Vec-Star/owl2vec_star/lib/Onto_Projection.py", line 798, in __extractTriplesFromComplexAxioms__
    for cls in self.onto.getClasses():
  File "/workspace/project/venv2/lib/python3.8/site-packages/owlready2/namespace.py", line 273, in classes
    if not s < 0: yield self.world._get_by_storid(s)
  File "/workspace/project/venv2/lib/python3.8/site-packages/owlready2/namespace.py", line 538, in _get_by_storid
    return self._load_by_storid(storid, full_iri, main_type, main_onto, default_to_none)
  File "/workspace/project/venv2/lib/python3.8/site-packages/owlready2/namespace.py", line 579, in _load_by_storid
    if obj2 is None: obj2 = self._load_by_storid(obj, None, main_type, main_onto, default_to_none, trace)
  File "/workspace/project/venv2/lib/python3.8/site-packages/owlready2/namespace.py", line 611, in _load_by_storid
    entity = ThingClass(name, types, { "namespace" : namespace, "storid" : storid } )
  File "/workspace/project/venv2/lib/python3.8/site-packages/owlready2/entity.py", line 145, in __new__
    Class = namespace.world._entities[storid] = _is_a._obj = type.__new__(MetaClass, name, superclasses, obj_dict)
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

The ontology I'm trying to embed is a merged ontology of HPO and HOOM, merged using Protégé.

Is this a bug? What is the problem here?