We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When running the following query, I get error.
g = Graph() g.parse("demo.nt", format="nt") qres = g.query(""" SELECT count(*) where{?s ?p ?o} """)
Error: File "/usr/local/lib/python2.7/dist-packages/rdflib/graph.py", line 1085, in query query_object, initBindings, initNs, **kwargs)) File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/sparql/processor.py", line 74, in query parsetree = parseQuery(strOrQuery) File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/sparql/parser.py", line 1058, in parseQuery return Query.parseString(q, parseAll=True) File "/usr/local/lib/python2.7/dist-packages/pyparsing-1.5.7-py2.7.egg/pyparsing.py", line 1006, in parseString raise exc pyparsing.ParseException: Expected "?" (at char 7), (line:1, col:8)
The text was updated successfully, but these errors were encountered:
heh, yes, sorry... virtuoso allows this, but we're closer to the sparql spec and require
select (count(*) as ?c) where {?s ?p ?o}
Sorry, something went wrong.
Thank you for the clarification. I was nearly going insane over it the other day.
No branches or pull requests
When running the following query, I get error.
g = Graph()
g.parse("demo.nt", format="nt")
qres = g.query("""
SELECT count(*)
where{?s ?p ?o}
""")
Error:
File "/usr/local/lib/python2.7/dist-packages/rdflib/graph.py", line 1085, in query
query_object, initBindings, initNs, **kwargs))
File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/sparql/processor.py", line 74, in query
parsetree = parseQuery(strOrQuery)
File "/usr/local/lib/python2.7/dist-packages/rdflib/plugins/sparql/parser.py", line 1058, in parseQuery
return Query.parseString(q, parseAll=True)
File "/usr/local/lib/python2.7/dist-packages/pyparsing-1.5.7-py2.7.egg/pyparsing.py", line 1006, in parseString
raise exc
pyparsing.ParseException: Expected "?" (at char 7), (line:1, col:8)
The text was updated successfully, but these errors were encountered: