Xqt created this task.
Xqt added projects: Pywikibot, Pywikibot-tests.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION
=================================== FAILURES
===================================
_________________ SiteRandomTestCase.test_unlimited_small_step
_________________
self = <tests.site_tests.SiteRandomTestCase
testMethod=test_unlimited_small_step>
def test_unlimited_small_step(self):
"""Test site.randompages() continuation.
Note that uniqueness is not guaranteed if multiple requests are
performed, so we also don't test this here.
"""
mysite = self.get_site()
pages = []
rngen = mysite.randompages(total=None)
rngen.set_query_increment = 5
> for rndpage in rngen:
tests/site_tests.py:2373:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
pywikibot/data/api.py:2563: in __iter__
self.data = self.request.submit()
pywikibot/data/api.py:1801: in submit
if self._internal_api_error(code, error, result):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _
self =
pywikibot.data.api.Request<wsbeta:en->'/w/api.php?format=json&indexpageids=&action=query&iiprop=timestamp|user|comment...&maxlag=5&inprop=protection&iilimit=max&uiprop=blockinfo|hasmsg&continue=&generator=random&grnlimit=500&meta=userinfo'>
code = 'internal_api_error_MWUnknownContentModelException'
error = {'*': 'MWUnknownContentModelException at
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)\nfr...g/wiki/Content_handlers
to find out which extensions handle this content model.", 'servedby':
'deployment-mediawiki11'}
result = {'error': {'code':
'internal_api_error_MWUnknownContentModelException', 'errorclass':
'MWUnknownContentModelException'.../wiki/Content_handlers to find out which
extensions handle this content model."}, 'servedby': 'deployment-mediawiki11'}
def _internal_api_error(self, code, error, result):
"""Check for internal_api_error_ or readonly and retry.
@raises pywikibot.exceptions.APIMWError: internal_api_error or
readonly
"""
iae = 'internal_api_error_'
if not (code.startswith(iae) or code == 'readonly'):
return False
# T154011
class_name = code if code == 'readonly' else removeprefix(code, iae)
del error['code'] # is added via class_name
e = pywikibot.exceptions.APIMWError(class_name, **error)
# If the error key is in this table, it is probably a temporary
# problem, so we will retry the edit.
# TODO: T154011: 'ReadOnlyError' seems replaced by 'readonly'
retry = class_name in ['DBConnectionError', # T64974
'DBQueryError', # T60158
'ReadOnlyError', # T61227
'readonly', # T154011
]
pywikibot.error('Detected MediaWiki API exception {}{}'
.format(e, '; retrying' if retry else '; raising'))
param_repr = str(self._params)
pywikibot.log('MediaWiki exception {} details:\n'
' query=\n{}\n'
' response=\n{}'
.format(class_name,
pprint.pformat(param_repr),
result))
if not retry:
> raise e
E pywikibot.exceptions.APIMWError:
internal_api_error_MWUnknownContentModelException:
[YJq3N6s-YQ8mga0ILiEltwAAABg] Exception caught: The content model 'JadeEntity'
is not registered on this wiki. See
https://www.mediawiki.org/wiki/Content_handlers to find out which extensions
handle this content model.
E [*: MWUnknownContentModelException at
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)
E from
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)
E #0
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(270):
MediaWiki\Content\ContentHandlerFactory->validateContentHandler(string, NULL)
E #1
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(189):
MediaWiki\Content\ContentHandlerFactory->createContentHandlerFromHook(string)
E #2
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(97):
MediaWiki\Content\ContentHandlerFactory->createForModelID(string)
E #3 /srv/mediawiki/php-master/includes/Title.php(4313):
MediaWiki\Content\ContentHandlerFactory->getContentHandler(string)
E #4
/srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(449):
Title->getPageLanguage()
E #5
/srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(420):
ApiQueryInfo->extractPageInfo(integer, Title)
E #6 /srv/mediawiki/php-master/includes/api/ApiQuery.php(326):
ApiQueryInfo->execute()
E #7 /srv/mediawiki/php-master/includes/api/ApiMain.php(1669):
ApiQuery->execute()
E #8 /srv/mediawiki/php-master/includes/api/ApiMain.php(639):
ApiMain->executeAction()
E #9 /srv/mediawiki/php-master/includes/api/ApiMain.php(610):
ApiMain->executeActionWithErrorHandling()
E #10 /srv/mediawiki/php-master/api.php(90): ApiMain->execute()
E #11 /srv/mediawiki/php-master/api.php(45): wfApiMain()
E #12 /srv/mediawiki/w/api.php(3): require(string)
E #13 {main};
E errorclass: MWUnknownContentModelException;
E servedby: deployment-mediawiki11]
pywikibot/data/api.py:1650: APIMWError
------------------------------ Captured log call
-------------------------------
WARNING pywiki:logging.py:102 API error
internal_api_error_MWUnknownContentModelException:
[YJq3N6s-YQ8mga0ILiEltwAAABg] Exception caught: The content model 'JadeEntity'
is not registered on this wiki. See
https://www.mediawiki.org/wiki/Content_handlers to find out which extensions
handle this content model.
VERBOSE pywiki:logging.py:102 headers=
{'Report-To': '{ "group": "wm_nel", "max_age": 86400, "endpoints": [{
"url":
"https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0"
}] }', 'X-Frame-Options': 'DENY', 'Permissions-Policy': 'interest-cohort=()',
'NEL': '{ "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05,
"success_fraction": 0.0}', 'MediaWiki-API-Error':
'internal_api_error_MWUnknownContentModelException', 'Date': 'Tue, 11 May 2021
16:56:23 GMT', 'Content-Encoding': 'gzip', 'X-Cache-Status': 'pass',
'Server-Timing': 'cache;desc="pass", host;desc="deployment-cache-text06"',
'X-Request-Id': 'YJq3N6s-YQ8mga0ILiEltwAAABg', 'Content-Length': '614',
'Content-Type': 'application/json; charset=utf-8', 'Connection': 'keep-alive',
'Vary': 'Accept-Encoding', 'Content-Disposition': 'inline;
filename=api-result.json', 'X-Content-Type-Options': 'nosniff',
'Accept-Ranges': 'bytes', 'X-Cache': 'deployment-cache-text06 miss,
deployment-cache-text06 pass', 'Cache-Control': 'private, must-revalidate,
max-age=0', 'X-Client-IP': '35.193.184.18', 'Server':
'deployment-mediawiki11.deployment-prep.eqiad1.wikimedia.cloud', 'Age': '8'}
ERROR pywiki:logging.py:102 Detected MediaWiki API exception
internal_api_error_MWUnknownContentModelException:
[YJq3N6s-YQ8mga0ILiEltwAAABg] Exception caught: The content model 'JadeEntity'
is not registered on this wiki. See
https://www.mediawiki.org/wiki/Content_handlers to find out which extensions
handle this content model.
[*: MWUnknownContentModelException at
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)
from
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)
#0
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(270):
MediaWiki\Content\ContentHandlerFactory->validateContentHandler(string, NULL)
#1
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(189):
MediaWiki\Content\ContentHandlerFactory->createContentHandlerFromHook(string)
#2
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(97):
MediaWiki\Content\ContentHandlerFactory->createForModelID(string)
#3 /srv/mediawiki/php-master/includes/Title.php(4313):
MediaWiki\Content\ContentHandlerFactory->getContentHandler(string)
#4 /srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(449):
Title->getPageLanguage()
#5 /srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(420):
ApiQueryInfo->extractPageInfo(integer, Title)
#6 /srv/mediawiki/php-master/includes/api/ApiQuery.php(326):
ApiQueryInfo->execute()
#7 /srv/mediawiki/php-master/includes/api/ApiMain.php(1669):
ApiQuery->execute()
#8 /srv/mediawiki/php-master/includes/api/ApiMain.php(639):
ApiMain->executeAction()
#9 /srv/mediawiki/php-master/includes/api/ApiMain.php(610):
ApiMain->executeActionWithErrorHandling()
#10 /srv/mediawiki/php-master/api.php(90): ApiMain->execute()
#11 /srv/mediawiki/php-master/api.php(45): wfApiMain()
#12 /srv/mediawiki/w/api.php(3): require(string)
#13 {main};
errorclass: MWUnknownContentModelException;
servedby: deployment-mediawiki11]; raising
VERBOSE pywiki:logging.py:102 MediaWiki exception
MWUnknownContentModelException details:
query=
("{'format': ['json'], 'indexpageids': [True], 'action': ['query'],
'iiprop': "
"['timestamp', 'user', 'comment', 'url', 'size', 'sha1', 'metadata'],
'prop': "
"['categoryinfo', 'imageinfo', 'info', 'proofread'], 'maxlag': ['5'], "
"'generator': ['random'], 'inprop': ['protection'], 'iilimit': ['max'], "
"'uiprop': ['blockinfo', 'hasmsg'], 'continue': [True], 'grnlimit':
['500'], "
"'meta': ['userinfo']}")
response=
{'servedby': 'deployment-mediawiki11', 'error': {'help':
'MWUnknownContentModelException at
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)\nfrom
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(201)\n#0
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(270):
MediaWiki\\Content\\ContentHandlerFactory->validateContentHandler(string,
NULL)\n#1
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(189):
MediaWiki\\Content\\ContentHandlerFactory->createContentHandlerFromHook(string)\n#2
/srv/mediawiki/php-master/includes/content/ContentHandlerFactory.php(97):
MediaWiki\\Content\\ContentHandlerFactory->createForModelID(string)\n#3
/srv/mediawiki/php-master/includes/Title.php(4313):
MediaWiki\\Content\\ContentHandlerFactory->getContentHandler(string)\n#4
/srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(449):
Title->getPageLanguage()\n#5
/srv/mediawiki/php-master/includes/api/ApiQueryInfo.php(420):
ApiQueryInfo->extractPageInfo(integer, Title)\n#6
/srv/mediawiki/php-master/includes/api/ApiQuery.php(326):
ApiQueryInfo->execute()\n#7
/srv/mediawiki/php-master/includes/api/ApiMain.php(1669):
ApiQuery->execute()\n#8
/srv/mediawiki/php-master/includes/api/ApiMain.php(639):
ApiMain->executeAction()\n#9
/srv/mediawiki/php-master/includes/api/ApiMain.php(610):
ApiMain->executeActionWithErrorHandling()\n#10
/srv/mediawiki/php-master/api.php(90): ApiMain->execute()\n#11
/srv/mediawiki/php-master/api.php(45): wfApiMain()\n#12
/srv/mediawiki/w/api.php(3): require(string)\n#13 {main}', 'info':
"[YJq3N6s-YQ8mga0ILiEltwAAABg] Exception caught: The content model 'JadeEntity'
is not registered on this wiki. See
https://www.mediawiki.org/wiki/Content_handlers to find out which extensions
handle this content model.", 'errorclass': 'MWUnknownContentModelException',
'code': 'internal_api_error_MWUnknownContentModelException'}}
=============================== warnings summary
===============================
TASK DETAIL
https://phabricator.wikimedia.org/T282602
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Aklapper, Xqt, pywikibot-bugs-list, Shalomori123, Jyoo1011, JohnsonLee01,
SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont,
JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]