You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a new rails 3.2.12 project, with the 0.9.3 version of Tripod.
I have an endpoint at: http://ewi.mmlab.be/geo/ which I place in my configuration like this:
However, when I try to fetch all categories I get the following error:
An appropriate representation of the requested resource sparql could not be found on this server.
I think the problem is with the request wanting 'application/n-triples', but the endpoint associates 'text/plain' with n-triples. Is there any way for me to configure this?
Full error output:
Loading development environment (Rails 3.2.12)
1.9.3p448 :001 > Category.all.resources
TRIPOD: building selectqueryfor criteria...
TRIPOD: with return_graph: true
TRIPOD caching is off!
TRIPOD: About to run query: SELECT DISTINCT ?uri ?graph WHERE { GRAPH ?graph { ?uri a <http://ewi.mmlab.be/ns#StatisticCategory>.?uri ?p ?o } }
TRIPOD: Streaming fron url: http://ewi.mmlab.be/geo/
TRIPOD: Streaming opts: {:accept=>"application/sparql-results+json", :timeout_seconds=>30, :response_limit_bytes=>5242880}
TRIPOD: received response code: 200 in: 0.390161 secs
TRIPOD: 1761 bytes streamed in: 0.002473 secs
TRIPOD: total request time: 0.392842 secs
TRIPOD caching is off!
TRIPOD: About to run query: DESCRIBE ?uri WHERE { SELECT DISTINCT ?uri ?graph WHERE { GRAPH ?graph { ?uri a <http://ewi.mmlab.be/ns#StatisticCategory>.?uri ?p ?o } } }
TRIPOD: Streaming fron url: http://ewi.mmlab.be/geo/
TRIPOD: Streaming opts: {:accept=>"application/n-triples", :timeout_seconds=>30, :response_limit_bytes=>5242880}
TRIPOD: received response code: 406 in: 0.212619 secs
Tripod::Errors::BadSparqlRequest: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>406 Not Acceptable</title></head><body><h1>406 Not Acceptable</h1><p>An appropriate representation of the requested resource sparql could not be found on this server.</p>
Available variant(s):
<ul><li><a href="sparql">sparql</a> , type text/turtle, charset UTF-8</li></ul></body></html>
from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/streaming.rb:35:in `block in get_data' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1323:in `block (2 levels) in transport_request' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:2672:in `reading_body' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1322:in `block in transport_request'
from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:in `catch' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1294:in `request' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1287:in `block in request' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:746:in `start' from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1285:in `request' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request'
from /Users/gilj/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1240:in `request_post' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/streaming.rb:30:in `get_data' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/sparql_client.rb:30:in `block in query' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/sparql_client.rb:41:in `call'
from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/sparql_client.rb:41:in `query' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/finders.rb:184:in `_raw_describe_select_results' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/finders.rb:164:in `_create_and_hydrate_resources_from_sparql' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/finders.rb:135:in `_resources_from_sparql'
from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/tripod-0.9.3/lib/tripod/criteria/execution.rb:15:in `resources' from (irb):1 from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start' from /Users/gilj/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require' from script/rails:6:in `<main>'1.9.3p448 :002 >
The text was updated successfully, but these errors were encountered:
If it can be of any help, my fork uses text/plain instead of n-triples because my endpoint didn't support it either. Please note that I didn't include the latest commits yet.
I created a new rails 3.2.12 project, with the 0.9.3 version of Tripod.
I have an endpoint at: http://ewi.mmlab.be/geo/ which I place in my configuration like this:
I created the following model to get data from the endpoint:
However, when I try to fetch all categories I get the following error:
I think the problem is with the request wanting 'application/n-triples', but the endpoint associates 'text/plain' with n-triples. Is there any way for me to configure this?
Full error output:
The text was updated successfully, but these errors were encountered: