Error: reparenting Thing to itself

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: reparenting Thing to itself

nade
I encounter a bug after running a reasoner (both HermiT and Pellet) in owlready2==0.37:
* Owlready * Reparenting owl.Thing: set() => {owl.Thing}
[...]
File "/usr/local/bin/anaconda3/envs/owlready_bugreport/lib/python3.7/site-packages/owlready2/entity.py", line 234, in __setattr__
    type.__setattr__(Class, attr, value)
TypeError: a __bases__ item causes an inheritance cycle

I'm not sure why, but apparently the reasoner recasts Thing as its own subclass.
For the reasoner itself, this is no issue: it runs just fine in Protege with the same reasoners.
Currently, I created my own workaround, where I skip the case of Thing being reparented to itself (maybe this should be expanded to any ontology class?)

My questions:
1. Please let me know how I can push my branch to the git project and file a merge request
2. Or if you think that these scenarios are instead the result of bad ontology logic, feel free to elaborate
Reply | Threaded
Open this post in threaded view
|

Re: Error: reparenting Thing to itself

Jiba
Administrator
Hi,

Thank you for investigating this problem. Could you send me both your fix and an ontology that raises this bug? I would like to understand why Thing is reparented as a child of itself, and whether this may occur on other classes or not.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Error: reparenting Thing to itself

nade
Yeah sure, how do you prefer me to send you my solution?
I currently have it locally as new git branch from the owlready2 project.

Regarding the reason, I've also been looking into it. I don't mind sharing my ontology, so you can also analyze it, but its contents is currently unpublished and confidential.
Therefore, I first have to minimize it and anonymize the class names. I'm aiming to do this next week.
Reply | Threaded
Open this post in threaded view
|

Re: Error: reparenting Thing to itself

Jiba
Administrator
Hi,

You can either submit the branch on Bitbucket or send me a patch.

Ok for the ontology, I'm waiting !

Jiba