Page MenuHomePhabricator

Wikidata Query with large number of results returns unusual error
Closed, DeclinedPublic

Description

This query:

https://query.wikidata.org/#SELECT%20%3Fitem%20%3Fpmcid%20%3Fcites%20WHERE%20%7B%0A%20%20%20%20%3Fitem%20wdt%3AP932%20%3Fpmcid%20.%0A%20%20%20%20%3Fitem%20p%3AP2860%20%3Fscites%20.%0A%20%20%20%20%3Fscites%20ps%3AP2860%20%3Fcites%20.%0A%20%20%20%20%3Fscites%20prov%3AwasDerivedFrom%20%5B%20pr%3AP248%20wd%3AQ229883%20%5D%20.%0A%7D

returns "Server error: Unexpected end of JSON input". I imagine this query has a large number of results, leading to the error, but this error isn't helpful in stating that.

Adding a limit of 100,000 results does prevent this error, but it would be nice to be able to get all of the results (or be told explicitly that I can't get them).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Smalyshev subscribed.

This happens when query times out but succeeds to deliver some results. Since the full count is 2527198, it is recommended to use limits in such cases, unless you indeed need all of them. Unfortunately, there's not much to do here, really, as the GUI just gets broken JSON and that's what is reported. See T107812 for more long-term look on this.