timrdf / DataFAQs

LINKED DATA QUALITY REPORTS
41 stars 7 forks source link

SuRF cannot execute_sparql #100

Open timrdf opened 12 years ago

timrdf commented 12 years ago

curl -H "Content-Type: text/turtle" -d @logd-converted-datasets-with-samples.ttl http://localhost:9113/via-sparql-query

^Cbash-3.2$ pwd
github/DataFAQs/services/sadi/core/select-datasets
bash-3.2$ python via-sparql-query.py 
via-sparql-query running on port 9113. Invoke it with:
curl -H "Content-Type: text/turtle" -d @my.ttl http://localhost:9113/via-sparql-query
text/turtle
https://raw.github.com/timrdf/DataFAQs/master/services/sadi/core/select-datasets/via-sparql-query-materials/sample-inputs/logd-converted-datasets-with-samples#apply
Unhandled Error
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/http.py", line 1349, in dataReceived
    finishCallback(data[contentLength:])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/http.py", line 1563, in _finishRequestBody
    self.allContentReceived()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/http.py", line 1619, in allContentReceived
    req.requestReceived(command, path, version)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/http.py", line 773, in requestReceived
    self.process()
--- <exception caught here> ---
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/server.py", line 127, in process
    self.render(resrc)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/server.py", line 147, in render
    body = resrc.render(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twisted/web/resource.py", line 216, in render
    return m(request)
  File "/Library/Python/2.7/site-packages/sadi-0.1.5-py2.7.egg/sadi/sadi.py", line 354, in render_POST
    graph = self.processGraph(content, request.getHeader("Content-Type"))
  File "/Library/Python/2.7/site-packages/sadi-0.1.5-py2.7.egg/sadi/sadi.py", line 289, in processGraph
    self.process(i, o)
  File "via-sparql-query.py", line 87, in process
    for queryToApply in input.session.default_store.execute_sparql(self.whatQueryQuery)['results']['bindings']:
  File "/Library/Python/2.7/site-packages/SuRF-1.1.4_r352-py2.7.egg/surf/store.py", line 200, in execute_sparql
    return self.reader.execute_sparql(sparql_query, format = format)
  File "/Library/Python/2.7/site-packages/surf.rdflib-1.0.0_r338-py2.7.egg/surf_rdflib/reader.py", line 87, in execute_sparql

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 360, in decode

exceptions.TypeError: expected string or buffer