Xqt created this task. Xqt added projects: Pywikibot, Pywikibot-tests. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION link_tests.Test.TestForeignInterwikiLinks.test_other_wiki_prefix fails. The reason is that https://bulbapedia.bulbagarden.net makes a safety check before the API request is processed. A html page is gven instead of a json content: **Just a moment...** requests.exceptions.JSONDecodeError: [Errno Expecting value] <!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="robots" content="noindex,nofollow"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="/cdn-cgi/styles/challenges.css" rel="stylesheet"><meta http-equiv="refresh" content="375"></head><body class="no-js"><div class="main-wrapper" role="main"><div class="main-content"><noscript><div id="challenge-error-title"><div class="h2"><span class="icon-wrapper"><div class="heading-icon warning-icon"></div></span><span id="challenge-error-text">Enable JavaScript and cookies to continue</span></div></div></noscript></div></div><script>(function(){window._cf_chl_opt={cvId: '2',cZone: "bulbapedia.bulbagarden.net",cType: 'managed',cNounce: '69021',cRay: '84257440ce496674',cHash: '82e0eb9e321a77e',cUPMDTk: "\/w\/api.php?action=query&meta=siteinfo%7Cuserinfo&siprop=namespaces%7Cnamespacealiases%7Cgeneral&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json&__cf_chl_tk=_IUfnb_MNE7ywqvW_P5FOylYE26b13841wP3bWRsIoE-1704727536-0-gaNycGzNDGU",cFPWv: 'g',cTTimeMs: '1000',cMTimeMs: '375000',cTplV: 5,cTplB: 'cf',cK: "visitor-time",fa: "\/w\/api.php?action=query&meta=siteinfo%7Cuserinfo&siprop=namespaces%7Cnamespacealiases%7Cgeneral&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json&__cf_chl_f_tk=_IUfnb_MNE7ywqvW_P5FOylYE26b13841wP3bWRsIoE-1704727536-0-gaNycGzNDGU",md: "5Y3OhQisiWrVQIAqgYxluurfJ48om3hJMmhEG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jx3jwqsfZ8epwLqB3M4Y=',hh: 'qNfFV/Z+B6QZ1cIV4cQ5fuse8PEbSPrc+iRKwVK3Clw=',}};var cpo = document.createElement('script');cpo.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?ray=84257440ce496674';window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;if (window.history && window.history.replaceState) {var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;history.replaceState(null, null, "\/w\/api.php?action=query&meta=siteinfo%7Cuserinfo&siprop=namespaces%7Cnamespacealiases%7Cgeneral&uiprop=blockinfo%7Chasmsg&maxlag=5&format=json&__cf_chl_rt_tk=_IUfnb_MNE7ywqvW_P5FOylYE26b13841wP3bWRsIoE-1704727536-0-gaNycGzNDGU" + window._cf_chl_opt.cOgUHash);cpo.onload = function() {history.replaceState(null, null, ogU);}}document.getElementsByTagName('head')[0].appendChild(cpo);}());</script></body></html>: 0 Therefore creating AutoFamily fails. The failing response is: ====================================================================== ERROR: test_other_wiki_prefix (tests.link_tests.TestForeignInterwikiLinks) Test that Link fails if the interwiki prefix is a unknown family. ---------------------------------------------------------------------- Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/work/pywikibot/pywikibot/pywikibot/data/api/_requests.py", line 725, in _json_loads result = response.json() File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/work/pywikibot/pywikibot/tests/link_tests.py", line 883, in test_other_wiki_prefix self.assertEqual(link.title, 'Title on auto-generated Site') File "/home/runner/work/pywikibot/pywikibot/pywikibot/page/_links.py", line 520, in title self.parse() File "/home/runner/work/pywikibot/pywikibot/pywikibot/page/_links.py", line 487, in parse elif self._site.namespaces[self._namespace].case == 'first-letter': File "/home/runner/work/pywikibot/pywikibot/pywikibot/tools/__init__.py", line 754, in wrapper val = fn(obj) File "/home/runner/work/pywikibot/pywikibot/pywikibot/site/_basesite.py", line 254, in namespaces return NamespacesDict(self._build_namespaces()) File "/home/runner/work/pywikibot/pywikibot/pywikibot/site/_apisite.py", line 1177, in _build_namespaces for nsdata in self.siteinfo.get('namespaces', cache=False).values(): File "/home/runner/work/pywikibot/pywikibot/pywikibot/site/_siteinfo.py", line 273, in get preloaded = self._get_general(key, expiry) File "/home/runner/work/pywikibot/pywikibot/pywikibot/site/_siteinfo.py", line 211, in _get_general default_info = self._get_siteinfo(props, expiry) File "/home/runner/work/pywikibot/pywikibot/pywikibot/site/_siteinfo.py", line 136, in _get_siteinfo data = request.submit() File "/home/runner/work/pywikibot/pywikibot/pywikibot/data/api/_requests.py", line 1251, in submit self._data = super().submit() File "/home/runner/work/pywikibot/pywikibot/pywikibot/data/api/_requests.py", line 980, in submit result = self._json_loads(response) File "/home/runner/work/pywikibot/pywikibot/pywikibot/data/api/_requests.py", line 747, in _json_loads raise SiteDefinitionError( pywikibot.exceptions.SiteDefinitionError: Invalid AutoFamily('bulbapedia.bulbagarden.net') ---------------------------------------------------------------------- https://github.com/wikimedia/pywikibot/actions/runs/7445056471/job/20252584651 TASK DETAIL https://phabricator.wikimedia.org/T354535 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: Aklapper, Xqt, pywikibot-bugs-list, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, binbot, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org