Page MenuHomePhabricator

archivebot fails on itwiki
Closed, ResolvedPublicBUG REPORT

Description

======================================================================
FAIL: test_archivebot_it (tests.archivebot_tests.TestArchiveBot.test_archivebot_it) (thread='grazie', content='e:Xqt|Xqt]] ([[Discussioni utente:Xqt|msg]]) 20:32, 13 ott 2009 (CEST)\n\n')
Test archivebot for one site on wikipedia:it
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pywikibot/pywikibot/tests/archivebot_tests.py", line 154, in test_archivebot
    self.assertIsInstance(thread.timestamp, datetime)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: None is not an instance of <class 'datetime.datetime'>

The reason is that Site.months_names were changed recently and textlib.TimeStripper cannot extract the timestamp anymore.

Event Timeline

Xqt triaged this task as High priority.Jan 29 2026, 10:04 AM
Xqt changed the subtype of this task from "Task" to "Bug Report".

@Xqt could you please check if T415876 closure did fix also archivebot?

Ciao, M/

The problem is similar to T324310 and T356175 and could be solved in a same way even the changed timestamp was used in meantime.

@M7: The tests were started on GitHub.

@M7: Looks good after that. Thank you for pointing this out.

Change #1235109 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@stable] archivebot: make TimeStripper more resilient for itwiki

https://gerrit.wikimedia.org/r/1235109

Xqt claimed this task.

@M7: Looks good after that. Thank you for pointing this out.

@Xqt I've also left a comment about date/time translation modifications on your translatewiki user page, I'd really like that you might explain how to avoid those situations to the user that originated these problems. This morning I saw a though impact even on it.wiki main page, on deletions, on other gadgets and scripts. Restoring the original MediaWiki variables helped temporarily fix the problem, but I'd rather not have people with a couple of changes across the entire Wikimedia project unknowingly messing with structures that have existed for about twenty years. Thanks for your understanding, M/

Change #1235109 merged by Xqt:

[pywikibot/core@stable] archivebot: make TimeStripper more resilient for itwiki

https://gerrit.wikimedia.org/r/1235109

Change #1235351 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] archivebot: make TimeStripper more resilient for itwiki

https://gerrit.wikimedia.org/r/1235351

Change #1235351 merged by Xqt:

[pywikibot/core@master] archivebot: make TimeStripper more resilient for itwiki

https://gerrit.wikimedia.org/r/1235351