owlready2
owlready2 copied to clipboard
Problem loading ontology from an N-triples file
Hello
I'm testing owlready2 which seems interesting.
But, I'm encoutering problem with the loading phase of one of my files with
senneville_ontology= get_ontology("file://c://wamp64/www/barbules/ontologies/test.nt").load()
where test.nt contains only one line
<http://barbules.givingsense.eu/ontologies/barbules/SENNEVILLE> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#NamedIndividual> .
I'm getting the following error:
...
File "C:\wamp64\www\CPD\trials\venv\lib\site-packages\owlready2\rdfxml_2_ntriples.py", line 315, in parse
raise OwlReadyOntologyParsingError("RDF/XML parsing error in file %s, line %s, column %s." % (getattr(f, "name", getattr(f, "url", "???")), parser.CurrentLineNumber, parser.CurrentColumnNumber)) from e
owlready2.base.OwlReadyOntologyParsingError: RDF/XML parsing error in file c://wamp64/www/barbules/ontologies/test.nt, line 1, column 7.
So, the file is recognized as being an N-triples file, but the parser fails to parse it.