[redland-dev] [Redland Language Bindings 0000569]: example.py: "librdf_query_execute(" ... syntax error, unexpected '(', expecting '{'
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Tue Apr 1 13:21:58 EDT 2014
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=569
======================================================================
Reported By: feuGene
Assigned To:
======================================================================
Project: Redland Language Bindings
Issue ID: 569
Category: installation
Reproducibility: have not tried
Severity: major
Priority: normal
Status: new
Binding Language (java, perl, php, python, ruby, tcl): python
======================================================================
Date Submitted: 2014-04-01 17:21
Last Modified: 2014-04-01 17:21
======================================================================
Summary: example.py: "librdf_query_execute(" ... syntax
error, unexpected '(', expecting '{'
Description:
I built redland 1.0.16 from source, and the Python bindings. Running example.py
isn't working:
# python example.py
found statement: <http://www.dajobe.org/>
<http://purl.org/dc/elements/1.1/creator> "Dave Beckett"
Parsing URI (file) ../data/dc.rdf
Parsing added 3 statements
Printing all statements
Statement: <http://www.dajobe.org/>
<http://purl.org/dc/elements/1.1/description> "The generic home page of Dave
Beckett."
Statement: <http://www.dajobe.org/> <http://purl.org/dc/elements/1.1/title>
"Dave Beckett's Home Page"
Statement: <http://www.dajobe.org/> <http://purl.org/dc/elements/1.1/creator>
"Dave Beckett"
Querying for dc:titles:
Traceback (most recent call last):
File "example.py", line 71, in <module>
for result in q.execute(model):
File "/root/redland-1.0.16/redland-bindings-1.0.16.1/python/RDF.py", line
1995, in execute
results = Redland.librdf_query_execute(self._query,model._model)
RDF.RedlandError: "syntax error, unexpected '(', expecting '{'"
-----
I went into example.py and tweaked line 69 from
q = RDF.Query("SELECT ?a ?c WHERE (?a dc:title ?c) USING dc FOR
<http://purl.org/dc/elements/1.1/>")
to
q = RDF.Query("SELECT ?a ?c WHERE {?a dc:title ?c} USING dc FOR
<http://purl.org/dc/elements/1.1/>")
and seemed to get past that (/{ error, but then hit another error:
Querying for dc:titles:
librdf error & - syntax error, unexpected $end
Traceback (most recent call last):
File "example.py", line 71, in <module>
for result in q.execute(model):
File "/root/redland-1.0.16/redland-bindings-1.0.16.1/python/RDF.py", line
1995, in execute
results = Redland.librdf_query_execute(self._query,model._model)
RDF.RedlandError: 'The namespace prefix in "dc:title" was not declared.'
-----
`make check` of the bindings seems fine. I did have some failures in the `make
check` of the raptor2 and redland. I've attached that output to this email, in
case it's relevant.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2014-04-01 17:21 feuGene New Issue
2014-04-01 17:21 feuGene File Added: make_check.out.tar.gz
======================================================================
More information about the redland-dev
mailing list