https://bugzilla.wikimedia.org/show_bug.cgi?id=69255
Bug ID: 69255 Summary: Scripts fail if only family:wikidata is specified Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: Wikidata Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: mpaa.wiki@gmail.com Web browser: --- Mobile Platform: ---
python pwb.py listpages.py -family:wikidata -start:A
Traceback (most recent call last): File "pwb.py", line 166, in <module> run_python_file(fn, argv, argvu) File "pwb.py", line 67, in run_python_file exec(compile(source, filename, "exec"), main_mod.__dict__) File "scripts/listpages.py", line 58, in <module> main() File "scripts/listpages.py", line 35, in main local_args = pywikibot.handleArgs(*args) File "/home/user/python/core/pywikibot/bot.py", line 638, in handleArgs init_handlers() File "/home/user/python/core/pywikibot/bot.py", line 246, in init_handlers writelogheader() File "/home/user/python/core/pywikibot/bot.py", line 257, in writelogheader site = pywikibot.Site() File "/home/user/python/core/pywikibot/__init__.py", line 527, in Site _sites[key] = __Site(code=code, fam=fam, user=user, sysop=sysop) File "/home/user/python/core/pywikibot/site.py", line 636, in __init__ BaseSite.__init__(self, code, fam, user, sysop) File "/home/user/python/core/pywikibot/site.py", line 167, in __init__ % (self.__code, self.__family.name)) pywikibot.exceptions.NoSuchSite: Language en does not exist in family wikidata <class 'pywikibot.exceptions.NoSuchSite'> CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
In site.py, the following fails: 158 if (self.__family.name in list(self.__family.langs.keys()) and 159 len(self.__family.langs) == 1):
len(self.__family.langs) is not 1: {'test': 'test.wikidata.org', 'wikidata': 'www.wikidata.org'}