Page MenuHomePhabricator fails for RuntimeError
Closed, ResolvedPublic


Command line:

python3 fixing_redirects -lang:ar -family:wikiversity -start:Template:!


ERROR: RuntimeError: getredirtarget: No 'redirects' found for page موضوع:علم المواد.
Traceback (most recent call last):
  File "", line 363, in <module>
    if not main():
  File "", line 358, in main
  File "", line 75, in run_python_file
  File "./scripts/", line 223, in <module>
  File "./scripts/", line 217, in main
  File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/", line 1487, in run
  File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/", line 1766, in treat
  File "./scripts/", line 147, in treat_page
    target = page.getRedirectTarget()
  File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/page/", line 1646, in getRedirectTarget
  File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/site/", line 2494, in getredirtarget
RuntimeError: getredirtarget: No 'redirects' found for page موضوع:علم المواد.
CRITICAL: Exiting due to uncaught exception <class 'RuntimeError'>


  • When running the script, the bot crashes when encountering the above error.
  • This is annoying as I have to manually restart the bot again.




Please implement the same fix for (i.e. make the bot skip the page in this case instead of crashing). Thank you.

Event Timeline

Meno25 created this task.Nov 9 2020, 3:26 PM
Restricted Application added subscribers: pywikibot-bugs-list, alaa, Aklapper. · View Herald TranscriptNov 9 2020, 3:26 PM

Change 640327 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] Ignore RuntimeError for missing 'redirects' in api response

Xqt claimed this task.Nov 10 2020, 8:41 AM
Xqt triaged this task as Low priority.

The RuntimeError due to missing 'redirects' entry in api Response can only passed on Pywikibot side but the underlying database could be corrupted and must be solved upstream.

Xqt lowered the priority of this task from Low to Lowest.Nov 10 2020, 10:15 AM

Solved on Pywikibot side.

Change 640327 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] Ignore RuntimeError for missing 'redirects' in api response

Meno25 closed this task as Resolved.Nov 10 2020, 6:10 PM