| Wesalius created this task. Wesalius added a project: Pywikibot-core. Herald added subscribers: pywikibot-bugs-list, Aklapper. |
TASK DESCRIPTION
When running this short script:
import pywikibot as pwb from pywikibot import pagegenerators as pg
QUERY = "SELECT ?item ?value WHERE {?item wdt:P1440 ?value .}"
site = pwb.Site("wikidata", "wikidata")
repo = site.data_repository()
generator = pg.WikidataSPARQLPageGenerator(QUERY,site=site)
for item in generator:
print(item)I get this error:
File "Stuff/test.py", line 7, in <module>
generator = pg.WikidataSPARQLPageGenerator(QUERY,site=site)
AttributeError: module 'pywikibot.pagegenerators' has no attribute 'WikidataSPARQLPageGenerator'
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
<class 'AttributeError'>Running on:
pywikibot (2.0rc5) - acquired by pip Python 3.5.2
TASK DETAIL
EMAIL PREFERENCES
To: Wesalius
Cc: Aklapper, Wesalius, pywikibot-bugs-list, MayS, Mdupont, JJMC89, jayvdb, Alchimista, Rxy
Cc: Aklapper, Wesalius, pywikibot-bugs-list, MayS, Mdupont, JJMC89, jayvdb, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
