DD063520 created this task.
DD063520 added projects: Pywikibot, Wikidata.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
Steps to Reproduce:
item = pywikibot.ItemPage(wikidata_repo, "Q1410828")
item.get()
Actual Results:
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py",
line 4541, in get
self.sitelinks[dbname] = self._content['sitelinks'][dbname]
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py",
line 6444, in __setitem__
val = SiteLink.fromJSON(val, self.repo)
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py",
line 6385, in fromJSON
sl = cls(data['title'], data['site'])
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py",
line 6329, in __init__
site, namespace, title = SiteLink._parse_namespace(title, site)
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/page.py",
line 6353, in _parse_namespace
site = pywikibot.site.APISite.fromDBName(site)
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py",
line 1888, in fromDBName
return cls(lang, site['code'])
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py",
line 1840, in __init__
BaseSite.__init__(self, code, fam, user, sysop)
File
"/Users/Dennis/Library/Python/3.6/lib/python/site-packages/pywikibot/site.py",
line 777, in __init__
% (self.__code, self.__family.name))
pywikibot.exceptions.UnknownSite: Language 'ban' does not exist in family
wikipedia
CRITICAL: Exiting due to uncaught exception <class
'pywikibot.exceptions.UnknownSite'>
Expected Results:
I expect that the entity can be imported normally.
The error message is quite clear, but for me it is not clear how to handle
that case. How can I add 'ban' to the wikipedia family? Should it not be
contained by default? Is there a way to synchronise the languages supported by
wikidata and the one supported in the pywikibot?
Thank you
D063520
TASK DETAIL
https://phabricator.wikimedia.org/T238404
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: DD063520
Cc: Xqt, Aklapper, DD063520, pywikibot-bugs-list, Zkhalido, darthmon_wmde,
Viztor, DannyS712, Nandana, Wenyi, Lahi, Gq86, GoranSMilovanovic, QZanden,
Tbscho, MayS, LawExplorer, Mdupont, JJMC89, Dvorapa, _jensen, rosalieper,
Altostratus, Avicennasis, Scott_WUaS, mys_721tx, Wikidata-bugs, aude, jayvdb,
Dalba, Masti, Alchimista, Mbch331, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs