test_preload_langlinks_normal and test_preload_langlinks_count site_tests.TestPagePreloading Fails due to unknown site 'de' in wsbeta Family:
_______________ TestPagePreloading.test_preload_langlinks_normal _______________ self = <tests.site_tests.TestPagePreloading testMethod=test_preload_langlinks_normal> def test_preload_langlinks_normal(self): """Test preloading langlinks works.""" mysite = self.get_site() links = mysite.pagelinks(self.get_mainpage(), total=10) gen = mysite.preloadpages(links, groupsize=5, langlinks=True) > for count, page in enumerate(gen): tests/site_tests.py:3019: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pywikibot/site/__init__.py:1714: in preloadpages api.update_page(page, pagedata, rvgen.props) pywikibot/data/api.py:3181: in update_page _update_langlinks(page, pagedict['langlinks']) pywikibot/data/api.py:3110: in _update_langlinks for link in langlinks] pywikibot/data/api.py:3110: in <listcomp> for link in langlinks] pywikibot/page/__init__.py:5981: in langlinkUnsafe link._site = pywikibot.Site(lang, source.family.name) pywikibot/tools/__init__.py:1479: in wrapper return obj(*__args, **__kw) pywikibot/__init__.py:1153: in Site _sites[key] = interface(code=code, fam=fam, user=user) pywikibot/tools/__init__.py:1562: in wrapper return obj(*new_args, **new_kwargs) pywikibot/site/__init__.py:110: in __init__ super().__init__(code, fam, user) pywikibot/tools/__init__.py:1562: in wrapper return obj(*new_args, **new_kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = APISite("de", "wsbeta"), code = 'de', fam = Family("wsbeta"), user = None @remove_last_args(['sysop']) def __init__(self, code: str, fam=None, user=None) -> None: """ Initializer. @param code: the site's language code @type code: str @param fam: wiki family name (optional) @type fam: str or pywikibot.family.Family @param user: bot user name (optional) @type user: 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('BaseSite: code "{}" converted to lowercase' .format(code)) code = code.lower() if not all(x in pywikibot.family.CODE_CHARACTERS for x in code): pywikibot.log('BaseSite: code "{}" contains invalid characters' .format(code)) self.__code = code if isinstance(fam, str) 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('Site {} instantiated using aliases code of {}' .format(self, code)) else: # no such language anymore self.obsolete = True pywikibot.log('Site %s instantiated and marked "obsolete" ' 'to prevent access' % self) elif self.__code not in self.languages(): if self.__family.name in self.__family.langs 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('Global configuration variable "mylang" changed to ' '"%s" while instantiating site %s' % (self.__code, self), UserWarning) else: raise UnknownSite("Language '%s' does not exist in family %s" > % (self.__code, self.__family.name)) E pywikibot.exceptions.UnknownSite: Language 'de' does not exist in family wsbeta pywikibot/site/_basesite.py:90: UnknownSite
https://api.travis-ci.org/v3/job/756234342/log.txt
See: https://de.wikisource.beta.wmflabs.org/wiki/Main_Page with message:
No wiki found
Sorry, we were not able to work out what wiki you
were trying to view. Please specify a valid Host header.
and result fo generate_family_file:
Usage: C:\pwb\GIT\core\generate_family_file.py <url> <short name> Example: C:\pwb\GIT\core\generate_family_file.py https://www.mywiki.bogus/wiki/Main_Page mywiki This will create the file mywiki_family.py in pywikibot\families Generating family file from http://en.wikisource.beta.wmflabs.org/ ================================== API url: https://en.wikisource.beta.wmflabs.org/w/api.php MediaWiki version: 1.36.0-alpha ================================== Determining other languages...aa ar ca crh cs de en en-rtl eo es fa he hi ja ko nl ru simple sq sr sv uk vi zh Loading wikis... WARNING: Http response status 404 * aa... Unsupported url: https://aa.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * ar... Unsupported url: https://ar.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * ca... Unsupported url: https://ca.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * crh... Unsupported url: https://crh.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * cs... Unsupported url: https://cs.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * de... Unsupported url: https://de.wikisource.beta.wmflabs.org/wiki/ * en... in cache WARNING: Http response status 404 * en-rtl... Unsupported url: https://en-rtl.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * eo... Unsupported url: https://eo.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * es... Unsupported url: https://es.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * fa... Unsupported url: https://fa.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * he... Unsupported url: https://he.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * hi... Unsupported url: https://hi.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * ja... Unsupported url: https://ja.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * ko... Unsupported url: https://ko.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * nl... Unsupported url: https://nl.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * ru... Unsupported url: https://ru.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * simple... Unsupported url: https://simple.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * sq... Unsupported url: https://sq.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * sr... Unsupported url: https://sr.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * sv... Unsupported url: https://sv.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * uk... Unsupported url: https://uk.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * vi... Unsupported url: https://vi.wikisource.beta.wmflabs.org/wiki/ WARNING: Http response status 404 * zh... Unsupported url: https://zh.wikisource.beta.wmflabs.org/wiki/ Writing C:\pwb\GIT\core\pywikibot\families\wsbeta_family.py...