Page MenuHomePhabricator

archivebot: Threads not archiving on ne.wikipedia
Closed, ResolvedPublicBUG REPORT

Description

Archivebot finds threads but reports "No thread is old enough. Skipping" despite threads being months old. Nepali Wikipedia uses Devanagari script for month names and Devanagari numerals in timestamps (e.g. ००:२६, ६ अप्रिल २०२६ (नेपाली समय)).

Details

Related Changes in Gerrit:

Event Timeline

Xqt triaged this task as Medium priority.EditedApr 27 2026, 8:36 AM
Xqt added a project: Pywikibot-textlib.
Xqt changed the subtype of this task from "Task" to "Bug Report".
Xqt subscribed.

@Saroj_Uprety: Could you please for test purposes (simulations only) provide a task page were the bot fails.

The reason can be found in the missing NON_ASCII_DIGITS for ne-wiki.
https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.userinterfaces.html#userinterfaces.transliteration.NON_ASCII_DIGITS

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

[pywikibot/core@master] Fix: Add Devanagari numerals to NON_ASCII_DIGITS

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

Hi @Xqt,
Here is a page where the bot fails:
https://ne.wikipedia.org/s/1f31
Let me know if you need anything else.

Hi @Xqt,
Let me know if you need anything else.

Ar you able to review this patch:
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1277442

Are those the right digits for the timestamp:
'ne': '०१२३४५६७८९',

I found out that the missing entry in NON_ASCII_DIGITS is not relevant for this issue because all known non-ascii digits are used to find a timstamp and ne-wiki has the same digits line hi-wiki which is the unicode "deva" numbering system.

I guess it is the localized timezone where the corresponding regex r'\((?P<tzinfo>[A-Z]+)\)' never fits. Here it is (नेपाली समय) for example. But unfortunately I haven't found the corresponding MediaWiki message yet.

command: >py -3.13 -m pwb -simulate -code:ne archivebot -page:"विकिपिडिया:चौतारी_(विविध)" "प्रयोगकर्ता:Groot (bot)/config"

The timezone string "नेपाली समय" comes from MediaWiki:Timezone-+0545 on ne.wikipedia (https://ne.wikipedia.org/wiki/MediaWiki:Timezone-+0545), which was created as a workaround in T245623.

Changing the regex for timezone works for me:

>py -3.13 -m pwb -simulate -code:ne archivebot -page:"विकिपिडिया:चौतारी_(विविध)" "प्रयोगकर्ता:Groot (bot)/config"


>>> [[ne:विकिपिडिया:चौतारी (विविध)]] <<<
93 thread(s) found on [[ne:विकिपिडिया:चौतारी (विविध)]]
Archiving 89 thread(s).
SIMULATION: edit action blocked.
Page [[विकिपिडिया:चौतारी (विविध)/अभिलेख 1]] saved
SIMULATION: edit action blocked.
Page [[विकिपिडिया:चौतारी (विविध)]] saved


Execution time: 8 seconds

The archive should go to विकिपिडिया:चौतारी (विविध)/अभिलेख ५ instead of अभिलेख 1 — looks like the counter is not working. Is it possible to support Devanagari numerals for the counter?

The archive should go to विकिपिडिया:चौतारी (विविध)/अभिलेख ५ instead of अभिलेख 1 — looks like the counter is not working. Is it possible to support Devanagari numerals for the counter?

Yes, but you have to change the template (प्रयोगकर्ता:Groot (bot)/config) variables to the %(local...)s counterparts, see the documentation
https://doc.wikimedia.org/pywikibot/stable/scripts_ref/scripts.html#module-scripts.archivebot or run py -m pwb archivebot -help

Change #1277442 merged by Xqt:

[pywikibot/core@master] Fix: Add Devanagari numerals to NON_ASCII_DIGITS

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