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

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

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

cknoll
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
Reply | Threaded
Open this post in threaded view
|

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

Jiba
Administrator
Hi,

Thank you for noticing this. I fixed the problem in the development version, by replace the del... with pop().

Jiba