Page MenuHomePhabricator

unusedfiles raises NoPage for deleted file with a redirect
Open, LowestPublic

Description

The first item on [[Special:UnusedFiles]] is currently [[File:Song_of_the_Thin_Man_(videocassette_cover_art).jpg]], which is deleted, however it has an incoming redirect which might be why it is still in unusedfiles, or perhaps a caching issue.

This causes unusedfiles to raise an exception, and there is no way to bypass it as the script only uses special:unusedfiles as a generator.

$ python pwb.py scripts/unusedfiles.py
Retrieving 50 pages from wikipedia:en.
WARNING: Http response status 404


>>> File:Song of the Thin Man (videocassette cover art).jpg <<<
Traceback (most recent call last):
  File "pwb.py", line 166, in <module>
    run_python_file(fn, argv, argvu)
  File "pwb.py", line 67, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "scripts/unusedfiles.py", line 117, in <module>
    main()
  File "scripts/unusedfiles.py", line 108, in main
    appendtext(image, u"\n\n" + template_image, always)
  File "scripts/unusedfiles.py", line 58, in appendtext
    raise pywikibot.NoPage(u"Page '%s' does not exist" % page.title())
pywikibot.exceptions.NoPage: Page Page 'File:Song of the Thin Man (videocassette cover art).jpg' does not exist doesn't exist.
<class 'pywikibot.exceptions.NoPage'>

Details

Reference
bz69133

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:36 AM
bzimport set Reference to bz69133.
bzimport added a subscriber: Unknown Object (????).

Change 151812 had a related patch set uploaded by John Vandenberg:
unusedfiles raises NoPage for deleted file

https://gerrit.wikimedia.org/r/151812

T12153 suggests that deleted files were not included in the results, so this is probably a regression in mw.

Change 151812 merged by jenkins-bot:
unusedfiles raises NoPage for deleted file

https://gerrit.wikimedia.org/r/151812

This is still an upstream issue to be investigated.