Repository navigation
bug:sparql.method = "POST" silently ignored — SPARQL queries always use GET #69
Description
Bug Report
**Describe the bug**
`_query_sparql_endpoint()` in `download.py` attempts to force HTTP POST for SPARQL
queries by directly assigning to the attribute:
```python
sparql.method = "POST"
However, SPARQLWrapper does not expose .method as a settable public attribute.
This assignment is silently ignored and the wrapper defaults to GET for all queries.
As a result, large SPARQL queries (e.g. those returned by collection endpoints) are
sent as GET requests, causing failures due to URL length limits on the server side.
To Reproduce
-
Install the client: pip install databusclient
-
Download a large collection:
databusclient download https://databus.dbpedia.org/dbpedia/collections/dbpedia-snapshot-2022-12 -
Observe that the underlying SPARQL query is sent via GET, which may fail for large
collection queries that exceed server-side URL length limits.
Expected behavior
The SPARQL query should be sent via HTTP POST. SPARQLWrapper provides the correct
API for this:
sparql.setMethod("POST") # correct ✅
# NOT: sparql.method = "POST" (silently ignored ❌)
Root Cause
File: databusclient/api/download.py , function _query_sparql_endpoint() , line 593.
# current (broken)
sparql = SPARQLWrapper(endpoint_url)
sparql.method = "POST" # ← has no effect
# fix
sparql = SPARQLWrapper(endpoint_url)
sparql.setMethod("POST") # ← correct SPARQLWrapper API
Additional context
• SPARQLWrapper version in use: ^2.0.0 (see pyproject.toml )
• The setMethod API has been available since SPARQLWrapper 1.x
• This affects any download that goes through a SPARQL query path: collections,
custom --databus queries, and group/artifact resolution.
Activity
Prakhar54-byte commentedon Jul 5, 2026
@Integer-Ctrl I'd like to work on this — can you assign me this issue .
[-]bug: <context of the bug>[/-][+]bug:sparql.method = "POST" silently ignored — SPARQL queries always use GET [/+]