KeyError when using importlib.reload(...) on the owlready module

Posted by cknoll on
URL: http://owlready.306.s1.nabble.com/KeyError-when-using-importlib-reload-on-the-owlready-module-tp2776.html

Hi,

while investigating another issue I came across this issue:

The last of these commands provokes an KeyError.

import importlib
import owlready2 as owl2

importlib.reload(owl2)

This is IMHO undesired behavior.


See also the notebook [1] for the informative traceback and a way to mitigate the problem.

[1] https://nbviewer.ipython.org/github/cknoll/demo-material/blob/main/expertise_system/owlready_demo4.ipynb 


Best, Carsten