Error parsing N-Triple file using RDFlib · Issue #782 · RDFLib/rdflib (original) (raw)
I am trying the load the triples from a Linked data dump into my local triplestore using RDFlib.
An example triple in my file: <http://SubjectURL> <http://propertyURL> "Some detail about the subject"@EN .
Snippet of the code:g.parse(path_of_the_file, format="nt")
Error Message:File "/usr/local/lib/python2.7/dist-packages/rdflib/graph.py", line 1039, in parse parser.parse(source, self, **args) File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/parsers/nt.py", line 26, in parse parser.parse(f) File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/parsers/ntriples.py", line 142, in parse raise ParseError("Invalid line: %r" % self.line) rdflib.plugins.parsers.ntriples.ParseError: Invalid line: u'@EN .'
Also, I got error same invalid line error for this triple:<http://data.archiveshub.ac.uk/id/extent/archbox/60> <http://data.archiveshub.ac.uk/def/archbox> 60.0 .