Re: UnboundLocalError: local variable 'entity' referenced before assignment
Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/UnboundLocalError-local-variable-entity-referenced-before-assignment-tp2349p2363.html
Hi,
The problem is caused by the fact that the ontology modifies a property (isAllergicTo) that is imported from another ontology. Owlready loads the ontology and then loads all properties from it, then loads the imported ontology.
I fixed the problem by loading imported ontologies BEFORE loading properties, in the development version of Owlready on BitBucket. With this modification, I've been able to load your ontology and to classify it with Pellet (it takes a few minutes though).
Jiba