Steps to replicate the issue:
Try a sample similar to the documentation of Page.main_authors() method but take a page which is not already cached upstream, for example
>>> import pywikibot
>>> pywikibot.config.max_retries = 3
>>> site = pywikibot.Site('wikipedia:als')
>>> page = pywikibot.Page(site, 'Python (Programmiersprache)')
>>> auth = page.main_authors(onlynew=False)
WARNING: WikiHistory timeout.
Waiting 5.0 seconds before retrying.
WARNING: WikiHistory timeout.
Waiting 10.0 seconds before retrying.
WARNING: WikiHistory timeout.
Waiting 20.0 seconds before retrying.
Traceback (most recent call last):
File "<pyshell#20>", line 1, in <module>
auth = page.main_authors(onlynew=False)
File "D:\pwb\GIT\core\pywikibot\page\_toolforge.py", line 108, in main_authors
raise pywikibot.exceptions.TimeoutError(
pywikibot.exceptions.TimeoutError: Maximum retries attempted without success.What happens?:
The method retries to retrieve the data but fails with a timeout. The remote url is something like
https://wikihistory.toolforge.org//wiki/getauthors.php?page_id=6995757&wiki=dewiki&onlynew=0
but the response is like
window.setTimeout("importScriptURI('//wikihistory.toolforge.org//wiki/getauthors.php?page_id=6995757&wiki=dewiki&onlynew=1&c=31&x=' + (new Date()).getTime())", 60000);The problem might be that no jobs are running upstream but the queues are increasing:
https://wikihistory.toolforge.org/admin.php
Seems this is due to T320157: Grid engine was shut down and wh was not migrated to k8s.
What could be done here?:
- stop the wait cycles until there is any solution
- wait for T320157 is solved upstream and wh works again
- find another solution e.g via
- wikihistory: screenscraping from https://wikihistory.toolforge.org/wh.php?wiki=alswiki&page_title=Python%20(Programmiersprache)
- xtools: screen scraping from https://xtools.wmcloud.org/articleinfo/als.wikipedia.org/Python%20%28Programmiersprache%29
- Find an api for xtools
- use WikiWho directly