Page MenuHomePhabricator

Error with subquery in selector
Open, Needs TriagePublic


I'm not really sure if this should be able to be supported, but the error messages says to report it so I am. :-)

The error is: <class 'IndexError'> list index out of range with the following input:

{{Property dashboard
|selector_sparql=wdt:P17 wd:Q408; wdt:P31 ?type . { SELECT * WHERE { ?type wdt:P279 wd:Q7075 } }

The idea is to select all entities of a type or any subtype (in this case, libraries and things like public libraries, academic libraries, etc.).

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptDec 10 2019, 5:58 AM

Thanks for reporting this :)

I reproduced it with your inputs at

Unfortunately, this is very mysterious, and can only come from an upstream pywikibot issue. I pushed 257618f188b that the failure is a bit more graceful at least.

Will also try again after upgrading pywikibot to the latest version.

Mentioned in SAL (#wikimedia-cloud) [2019-12-11T15:15:42Z] <wm-bot> <jeanfred> Deploy latest from Git master: 257618f1 (T240312)

Pywikibot upgrade to latest version did not help :-( . I’ll dig deeper and file an issue upstream.