Questions tagged [sparqlwrapper]

SPARQL Wrapper is a SPARQL Endpoint interface to Python

SPARQLWrapper is a SPARQL Endpoint interface to Python

158 questions
2
votes
0 answers

Avoiding HTTP "too many requests" error when using SPARQLWrapper and Wikidata

I have a list of approximately 6k wikidata instance IDs (beginning Q#####) I want to look up the human-readable labels for. I am not too familiar with SPARQL, but following some guidelines have managed to find a query that works for a single…
cookie1986
  • 865
  • 12
  • 27
2
votes
0 answers

getting HTTP 406 querying GraphDB using SPARQLWrapper

I'm querying a database in GraphDB using SPARQLWrapper. Insert is working fine but when the query is SELECT, I get HTTP 406 using GET method and HTTP 415 using POST. Similar Select query works on other databases like wikidata but not on GraphDB.…
Eli
  • 21
  • 1
2
votes
0 answers

SPARQL Join ttl to dbpedia in Python

So I know that in order to run SPARQL statements against a local ttl file I use rdflib. In order to run SPARQL statements against dbpedia I run Sparqlwrapper. But how do I do both? i.e. suppose I have a local ttl file and I want to leverage some…
Dano13
  • 149
  • 9
2
votes
0 answers

SparqlWrapper error - urllib.error.HTTPError: HTTP Error 406: Unacceptable

Please find below query, which gives 406 error when I try to query the sparql endpoint. I am not sure why. Could anyone help me with this? Thanks in advance. from SPARQLWrapper import SPARQLWrapper, JSON, POST, DIGEST import json sparql =…
Swaroop
  • 109
  • 3
  • 9
2
votes
1 answer

Sparqlwrapper: Its not returning anything but the query is working with dbpedia.org/sparql

I have also added the snippet below. This query will return the name of the company uri, its name and parent company. It is working with DBpedia.org/sparql but not with sparqlwrapper(not returning anything; ) query1 = """ PREFIX rdfs:…
tpatty
  • 21
  • 2
2
votes
1 answer

SPARQL query on multiple RDF files

I have some basics of programming, but I am completely new to RDF or Sparql, so I hope to be clear in what follows. I am trying to download some data available at http://data.camera.it/data/en/datasets/, and all the data are organized in rdf-xml…
mgiom
  • 57
  • 7
2
votes
1 answer

Correct way to write JSON data returned from a SPARQL query in Python

I'm using python3 to make SPARQL queries. I need to read a Virtuoso database and output triples. Some of the data in the triples contains special characters like linefeeds and such. Anyway, I can get the data out like this: queryString = "some…
elbillaf
  • 1,952
  • 10
  • 37
  • 73
2
votes
2 answers

visualize n-triple file python

Is there a module or tool in Python that will help me visualize RDF data? I have a N-Triple file and want to load it in python and display the information in it visually. I am currently using RDFLib but it does not have a visualize function. Thank…
Resu
  • 187
  • 1
  • 12
2
votes
1 answer

SPARQLWrapper not returning JSON

The following code should return a dictionary of the subject of all triples in the ontology. It, instead, returns the entire ontology as an XML string. from SPARQLWrapper import SPARQLWrapper, JSON sparql =…
mac389
  • 3,004
  • 5
  • 38
  • 62
2
votes
0 answers

How to see SPARQL query plan

We use EXPLAIN ANALYZE to view a SQL query plan. If there any equivalent of it is available for SPARQL query?
Beautiful Mind
  • 5,828
  • 4
  • 23
  • 42
2
votes
1 answer

Error in python code with SPARQL query

I'm writing a python code to retrieve all actors which is common to both DBpedia and Wikidata. And also getting some additional information like awards received from wikidata. But its throwing an error. I'm not sure how to correct this error. Here…
2
votes
1 answer

Obtaining information from is dbp: ... of

I am trying to get some information of the DBpedia page of Rodger Federer. I want to query in which years Roger Federer was flagbearer at the Olympic Games. I can extract information from normal property fields (dbp:plays), but not if the property…
2
votes
1 answer

All SPARQL queries to my Sesame data store fail (returning nothing). What do I have configured incorrectly?

I've installed openrdf-sesame and openrdf-workbench (2.8.6) under tomcat7 on ubuntu Linux. I loaded the following data: @prefix mur: . @prefix branda: . @prefix brandb:…
2
votes
3 answers

URLError with SPARQLWrapper at sparql.query().convert()

I try a small python script to test my SPARQL request. However, just the next simple code doesn't work. from SPARQLWrapper import SPARQLWrapper, JSON import rdflib #connect to the sparql point sparql =…
Cyril
  • 485
  • 4
  • 15
2
votes
1 answer

Sparql endpoint for SAIL object

I have created a SAIL object using tinkerpop blueprints to load RDF data into a Graph database. Ive successfully managed to load the data. The Graph database in question does not have a sparql endpoint to run my query mix test driver. Does anyone…
1
2
3
10 11