https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
Bug ID: 69133 Summary: unusedfiles raises NoPage for redirect to deleted file Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: NEW Severity: major Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: jayvdb@gmail.com Web browser: --- Mobile Platform: ---
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'>
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|unusedfiles raises NoPage |unusedfiles raises NoPage |for redirect to deleted |for deleted file with a |file |redirect
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
--- Comment #1 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 151812 had a related patch set uploaded by John Vandenberg: unusedfiles raises NoPage for deleted file
https://gerrit.wikimedia.org/r/151812
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
--- Comment #2 from John Mark Vandenberg jayvdb@gmail.com --- The 404 is because unusedfiles calls image.getImagePageHtml(), which does
GET https://en.wikipedia.org/w/index.php?title=File%3ASong_of_the_Thin_Man_%28vi...
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
--- Comment #3 from John Mark Vandenberg jayvdb@gmail.com --- bug 10153 suggests that deleted files were not included in the results, so this is probably a regression in mw.
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
--- Comment #4 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 151812 merged by jenkins-bot: unusedfiles raises NoPage for deleted file
https://gerrit.wikimedia.org/r/151812
https://bugzilla.wikimedia.org/show_bug.cgi?id=69133
Ricordisamoa ricordisamoa@openmailbox.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
pywikipedia-bugs@lists.wikimedia.org