W3C home > Mailing lists > Public > public-cwm-talk@w3.org > April to June 2010

problem with a SPARQL QUERY

From: Story Henry <henry.story@bblfish.net>
Date: Mon, 26 Apr 2010 17:32:38 +0100
Message-Id: <31245A43-55C8-45C1-9BEC-2C418D814A68@bblfish.net>
To: public-cwm-talk@w3.org
I think I have  a pretty simple SPARQL query here, and it looks fine. But running it on the head of
swap seems to cause trouble.

$ cat p1.sparql 
SELECT ?r
WHERE {
   ?s ?r ?pk .
}


$ cwm --mode=rse proof1.n3 ont.n3  --think --sparql=p1.sparql 
#Processed by Id: cwm.py,v 1.197 2007/12/13 15:38:39 syosi Exp 
        #    using base file:///Users/hjs/Programming/FoafSSL/foafssl-java/papers/spot2009/n3/
        Traceback (most recent call last):
  File "/Users/hjs/Programming/w3.org/2000/10/swap/cwm.py", line 750, in <module>
    doCommand()
  File "/Users/hjs/Programming/w3.org/2000/10/swap/cwm.py", line 564, in doCommand
    referer="", contentType="x-application/sparql")
  File "/Users/hjs/Programming/w3.org/2000/10/swap/llyn.py", line 1616, in load
    referer=referer, why=why)  
  File "/Users/hjs/Programming/w3.org/2000/10/swap/webAccess.py", line 195, in load
    p = sparql_parser.N3Parser(StringIO.StringIO(buffer), sparql_parser.branches, convertor)
  File "/Users/hjs/Programming/w3.org/2000/10/swap/sparql/sparql_parser.py", line 47, in __init__
    lexer = sparql_tokens.Lexer()
  File "/Users/hjs/Programming/w3.org/2000/10/swap/sparql/sparql_tokens.py", line 272, in __init__
    self.fixTokens()
  File "/Users/hjs/Programming/w3.org/2000/10/swap/sparql/sparql_tokens.py", line 314, in fixTokens
    importTokens()
  File "/Users/hjs/Programming/w3.org/2000/10/swap/sparql/sparql_tokens.py", line 40, in importTokens
    F = myStore.load('http://www.w3.org/2000/10/swap/grammar/sparql')
  File "/Users/hjs/Programming/w3.org/2000/10/swap/myStore.py", line 166, in load
    remember=remember, flags=flags)
  File "/Users/hjs/Programming/w3.org/2000/10/swap/llyn.py", line 1616, in load
    referer=referer, why=why)  
  File "/Users/hjs/Programming/w3.org/2000/10/swap/webAccess.py", line 178, in load
    raise DocumentAccessError(addr, sys.exc_info() )
swap.webAccess.DocumentAccessError: Unable to access document <http://www.w3.org/2000/10/swap/grammar/sparql>, because:
    HTTP Error 406: Not Acceptable


It seems like it is trying to make a local request, and having problems with the mime type...

Henry

Social Web Architect
http://bblfish.net/
Received on Monday, 26 April 2010 16:33:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 26 April 2010 16:33:16 GMT