Xqt added a comment.
Ok I guess what happened. You probably changed the archive string like [https://simple.wikipedia.org/w/index.php?title=User_talk%3APotsdamLamb&type=revision&diff=8355329&oldid=8355295 here]. If the counter is higher than 1 and a archive is not found than it decreases the counter until it founds an archive page. Here is the code of this: while counter > 1 and not archive.exists(): # This may happen when either: # 1. a previous version of the bot run and reset # the counter without archiving anything # (number #3 above) # 2. era changed between runs. # Decrease the counter. # TODO: This can be VERY slow, use preloading # or binary search. counter -= 1 params = self.get_params(thread.timestamp, counter) archive = self.get_archive_page( pattern % params, params) I found these archives: F35332954: image.png <https://phabricator.wikimedia.org/F35332954> For example if you try to archive `archive = User talk:PotsdamLamb/Archive%(counter)d` and the counter is 4, the bot will count down until it finds the `User talk:PotsdamLamb/Archive1` page. By the way you may always use %(<variable>)**s** instead of %(<variable>)**d**. The **d** variant is for numbers only and will fail for strings whereas **s** is for both. Due to the //"Error messages with ‘%’ style is deprecated"//: looks your code of archivebot.py (and perhaps also the framework) is a bit outdated; I guess about one year. TASK DETAIL https://phabricator.wikimedia.org/T313682 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt Cc: Xqt, Aklapper, pywikibot-bugs-list, #pywikibot-archivebot.py, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, MJL, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
