Exception ignored in: 'owlready2_optimized.add_to_bn2'

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

Exception ignored in: 'owlready2_optimized.add_to_bn2'

tajileye
This post was updated on .
When running through the following code:

self._world = World()
self._ontology = self._world.get_ontology(f"file://<some path>").load()
entity = self._world[<some iri>]

I get a list of errors like this

KeyError: '_:owlready_blank_2'
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
KeyError: '_:owlready_blank_2'

Exception ignored in: 'owlready2_optimized.add_to_bn2'
Traceback (most recent call last):
  File "[...]/.venv/lib/python3.8/site-packages/owlready2/driver.py", line 218, in do_parse
    if   format == "rdfxml": owlready2_optimized.parse_rdfxml(f, queue, default_base, batch_size)
KeyError: '_:owlready_blank_2'

These errors only show up with the optimised c implementation.
Can I fix or mute these errors? What is this about?
Reply | Threaded
Open this post in threaded view
|

Re: Exception ignored in: 'owlready2_optimized.add_to_bn2'

tajileye
I fixed this issue by identifying and removing some weird statements in the rdf/xml source file