I have a really simple piece of code but it already runs into an error. My piece of code should just iterate over the class names in an ontology and print them out. This works for the first 20 or so, but then this error occurs:
Fatal Python error: Cannot recover from stack overflow.
Current thread 0x0000000106d2ae00 (most recent call first):
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/util.py", line 249 in __enter__
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 543 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 540 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 538 in _get_by_storid
File "/Users/PATH/.env/lib/python3.7/site-packages/owlready2/namespace.py", line 558 in _load_by_storid
...
[1] 51983 abort python owl_to_nodenames.py
My code using owlready2 is only those 4 lines:
from owlready2 import get_ontology
onto = get_ontology("Ontologie.owl").load()
for this in onto.classes():
print(this)
Can you point me to the error? I originally tried it on a MacBook, but now I also tested it on a computer running Arch, same error.