User:RonBot/DummyRun
Appearance
- Dummy run with 2 lines commented out - look for "(DO NOT UNCOMMENT UNTIL BOT IS APPROVED)" in source below (should have been 3 - see point 4 below
- Run time is about 4 secs per image, and we will have to add a save overhead.
- Hidden items are still showing in the "done" list - see File:Baahubali 2 The Conclusion poster.jpg - 7 "done" on run - and 6 are already hidden
- Missed commenting the line pagepage.edit(text=pagetext, summary="Requesting manual review ([[User:RonBot/Run|disable]])"), now disabled. but it was wrong - see https://en.wikipedia.org/w/index.php?title=File%3AAllenWalkerVolume9Excerpt.jpg&type=revision&diff=771169808&oldid=769652902 - Actually not sure why that file got added for manual review...?
File "deleter2.py", line 53 'reason':'Orphaned non-free file revision(s) deleted per [[WP:F5|F5]] ([[User:RonBot/Run|disable]])" ^ Changed to single quote ========================================================= File "deleter2.py", line 111 if tobreak = yes: ^ SyntaxError: invalid syntax Changed to == ========================================================= Traceback (most recent call last): File "deleter2.py", line 145, in <module> main() File "deleter2.py", line 111, in main if tobreak == yes: UnboundLocalError: local variable 'tobreak' referenced before assignment Added a line to pre-declare... def main(): tobreak = no ========================================================= Traceback (most recent call last): File "deleter2.py", line 146, in <module> main() File "deleter2.py", line 79, in main tobreak = yes NameError: global name 'yes' is not defined Changed yes and no in tobreak places to "yes" and "no" ========================================================= local variable 'user' referenced before assignment Changed to... def allow_bots(pagetext, username): user = username.lower().strip() ---- was user = user.lower().strip() ========================================================= local variable 'text' referenced before assignment Changed to def allow_bots(pagetext, username): user = username.lower().strip() text = mwparserfromhell.parse(pagetext) ---- was text = mwparserfromhell.parse(text) ========================================================= C:\Python27\bot>python deleter2.py 'imageinfo' Done for File:2017 K League Classic.png Done for File:AbanteCart Software logo.png Done for File:AbanteCart Software logo.png Done for File:AbanteCart Software logo.png Done for File:Adobe-Ultra-Screenshot.gif Done for File:Al-Naft SC logo.png Done for File:Al-Naft SC logo.png Done for File:Al-Shorta SC crest (1932-2002).png Done for File:Alive in the Nineties.jpg Done for File:Allen Wranglers IFL team logo.png Done for File:Almost Frantic (LP) by Russell Morris.jpg Done for File:Alto Neptune Filemanager.gif Done for File:Angamaly Diaries poster.jpg Done for File:Another World (Andy LaVerne album).jpg Done for File:Arab Idol.jpg Done for File:Aremarler.jpg Done for File:Aresia.jpg Done for File:Arjunwedsamrutha.jpg Done for File:Asociación de Guías Scouts Dominicanas.png Done for File:AstrobiologyMagazine-EuropaSurface.jpg Done for File:AstrobiologyMagazine-NASA-MarsCuriosityRov Done for File:Aurat1967.jpg Done for File:Aurat1967.jpg Done for File:Auskick2007no2.png Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baahubali 2 The Conclusion poster.jpg Done for File:Baby Driver poster.jpg Done for File:Back East Redman.jpg ^C C:\Python27\bot>