Re: error_on_undefined_entity=False not working with sparql query on read-only DB

Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/error-on-undefined-entity-False-not-working-with-sparql-query-on-read-only-DB-tp3423p3424.html

The use of "error_on_undefined_entities=False" allows to query entities that are not yet defined in the quadstore. However, OWL and RDF identify entities by IRI, while Owlready uses Store-ID (storid), which are integer numbers. Before performing the query, Owlready needs to create a Store-ID for the given IRI, which requires to write in the database (in the "resources" table).

To avoid the problem, you can either remove "read_only=True" to allow writing, or verify before performing the query whether the entity exists (using Word[iri]). If the entity does not exist, you could perform a different query that does not use this entity, or no query at all if the missing entity is mandatory.

Jiba