Parsing nquads · Issue #786 · RDFLib/rdflib (original) (raw)

I was trying to load a datadump in nquad format into my local triple store. There is no error while parsing but the graph remains empty.
Code:

    graph = ConjunctiveGraph('Sleepycat')
    graph.open(path_to_triplestore, create=False)
    g = Graph()   
    g.parse(path_to_file, format="nquads") 
    for t in g: #this does not iterate as g stays empty
        pprint.pprint(t)
        graph.add(t) 

Here is a sample of a triple in nquad format

<http://bio2rdf.org/drugbank:DB00001> <http://purl.org/dc/terms/identifier> "drugbank:DB00001"^^<http://www.w3.org/2001/XMLSchema#string> <http://bio2rdf.org/drugbank_resource:bio2rdf.dataset.drugbank.R3> .

Is it a bug or am I missing something?