| Dalba created this task. Dalba added projects: Pywikibot-tests, Pywikibot-core. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. |
TASK DESCRIPTION
https://travis-ci.org/wikimedia/pywikibot/jobs/412492812#L1837
____________________ TestSiteGenerators.test_pagelanglinks _____________________ self = <tests.site_tests.TestSiteGenerators testMethod=test_pagelanglinks> def test_pagelanglinks(self): """Test Site.pagelanglinks.""" > for ll in self.site.pagelanglinks(self.mainpage): tests/site_tests.py:593: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pywikibot/site.py:4152: in pagelanglinks source=self) pywikibot/page.py:5895: in langlinkUnsafe link._site = pywikibot.Site(lang, source.family.interwiki_forward) pywikibot/__init__.py:1275: in Site _sites[key] = interface(code=code, fam=fam, user=user, sysop=sysop) pywikibot/site.py:1850: in __init__ BaseSite.__init__(self, code, fam, user, sysop) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = APISite("sat", "wikipedia"), code = 'sat', fam = Family("wikipedia") user = None, sysop = None def __init__(self, code, fam=None, user=None, sysop=None): """ Initializer. @param code: the site's language code @type code: str @param fam: wiki family name (optional) @type fam: str or Family @param user: bot user name (optional) @type user: str @param sysop: sysop account user name (optional) @type sysop: str """ if code.lower() != code: # Note the Site function in __init__ also emits a UserWarning # for this condition, showing the callers file and line no. pywikibot.log(u'BaseSite: code "%s" converted to lowercase' % code) code = code.lower() if not all(x in pywikibot.family.CODE_CHARACTERS for x in str(code)): pywikibot.log(u'BaseSite: code "%s" contains invalid characters' % code) self.__code = code if isinstance(fam, basestring) or fam is None: self.__family = pywikibot.family.Family.load(fam) else: self.__family = fam self.obsolete = False # if we got an outdated language code, use the new one instead. if self.__code in self.__family.obsolete: if self.__family.obsolete[self.__code] is not None: self.__code = self.__family.obsolete[self.__code] # Note the Site function in __init__ emits a UserWarning # for this condition, showing the callers file and line no. pywikibot.log(u'Site %s instantiated using code %s' % (self, code)) else: # no such language anymore self.obsolete = True pywikibot.log(u'Site %s instantiated and marked "obsolete" ' u'to prevent access' % self) elif self.__code not in self.languages(): if self.__family.name in list(self.__family.langs.keys()) and \ len(self.__family.langs) == 1: self.__code = self.__family.name if self.__family == pywikibot.config.family \ and code == pywikibot.config.mylang: pywikibot.config.mylang = self.__code warn(u'Global configuration variable "mylang" changed to ' u'"%s" while instantiating site %s' % (self.__code, self), UserWarning) else: raise UnknownSite(u"Language '%s' does not exist in family %s" > % (self.__code, self.__family.name)) E pywikibot.exceptions.UnknownSite: Language 'sat' does not exist in family wikipedia pywikibot/site.py:778: UnknownSite
TASK DETAIL
EMAIL PREFERENCES
To: Dalba
Cc: Aklapper, pywikibot-bugs-list, Dalba, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
Cc: Aklapper, pywikibot-bugs-list, Dalba, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
