@Ronhjones: Two actions before it was not "uploaded a new version of x", it was [1]. I've updated the code. Dat GuyTalkContribs 17:59, 25 March 2017 (UTC)
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>