More precisely it creates Archive19, but saves into Archive1 (Archive19 is left blank).
It seems like a regression from T215247 (@matej_suchanek)
More precisely it creates Archive19, but saves into Archive1 (Archive19 is left blank).
It seems like a regression from T215247 (@matej_suchanek)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | matej_suchanek | T215247 archivebot should reset counter when changing a year | |||
Resolved | None | T217107 archivebot resets the numbering to 1 even for non-year archives |
The bot decides to reset counter if the archive page with counter := 1 doesn't exist. If /Archive1 had existed (even as redirect to /Archive), it would have been treated correctly (hopefully). Perhaps we shouldn't attempt to reset counter if the archive pattern doesn't depend on anything but counter.
Ghost archive problem is definitely a regression. I can solve it either by preventing saving archives with 0 archived sections or by not caching archives that we don't know they'll exist.
I see, this behavior is not ideal. Especially on cswiki the archive title changed in past for some frequently used talk pages (also Pywikibot wasn't always the way they were archived), so archivebot should not rely on the archive title unchangeability.
@matej_suchanek It also edits the 1st archive if it exists, see https://cs.wikipedia.org/w/index.php?title=Wikipedie:N%C3%A1st%C4%9Bnka_spr%C3%A1vc%C5%AF/Archiv1&diff=prev&oldid=17057446&diffmode=source
Traceback I got today:
$ python pwb.py archivebot Archivace Fetching template transclusions... Processing [[cs:Wikipedie:Potřebuji pomoc]] 101 thread(s) found on [[cs:Wikipedie:Potřebuji pomoc]] Looking for: {{Šablona:Archivace}} in [[cs:Wikipedie:Potřebuji pomoc]] Processing 101 threads ERROR: Error occurred while processing page [[cs:Wikipedie:Potřebuji pomoc]] ERROR: IsRedirectPage: Page [[cs:Wikipedie:Potřebuji pomoc/Archiv1]] is a redirect page. Traceback (most recent call last): File "./scripts/archivebot.py", line 803, in main archiver.run() File "./scripts/archivebot.py", line 658, in run whys = self.analyze_page() File "./scripts/archivebot.py", line 645, in analyze_page if self.feed_archive(archive, t, max_arch_size, params): File "./scripts/archivebot.py", line 602, in feed_archive self.archives[title] = DiscussionPage(archive, self, params) File "./scripts/archivebot.py", line 427, in __init__ self.load_page() File "./scripts/archivebot.py", line 445, in load_page text = self.get() File "/home/pavel/pywikibot/pywikibot/tools/__init__.py", line 1738, in wrapper return obj(*__args, **__kw) File "/home/pavel/pywikibot/pywikibot/page.py", line 486, in get self._getInternals(sysop) File "/home/pavel/pywikibot/pywikibot/page.py", line 524, in _getInternals raise self._getexception pywikibot.exceptions.IsRedirectPage: Page [[cs:Wikipedie:Potřebuji pomoc/Archiv1]] is a redirect page.
It tries to edit Archiv1 page even if the current one (set in Archivace template) should be Archiv18
Since the bot analyzes the discussion page from the top to the bottom and doesn't strictly follow the chronological order (considering the latest contribution to individual threads), there is another (hypothetical) flaw that can surprise users:
Fixing this task, the above problem or e.g. T182685 will probably need rewriting of the main routine of archivebot.py (work in progress).