Page MenuHomePhabricator

KeyError: 'count' on archivebot.py via PAWS
Closed, ResolvedPublicBUG REPORT

Description

I've tried to archive using archivebot via PAWS. I got the following error:

@PAWS:~$ pwb.py archivebot User:MiszaBot/config -family:meta -lang:meta -page:"Talk:Admin activity review" -pt:1 -v
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]
Processing [[meta:Talk:Admin activity review]]
Found 1 meta:meta processes running, including this one.
10 thread(s) found on [[meta:Talk:Admin activity review]]
Looking for: {{User:MiszaBot/config}} in [[meta:Talk:Admin activity review]]
Processing 10 threads
ERROR: Error occurred while processing page [[meta:Talk:Admin activity review]]
ERROR: KeyError: 'count'
Traceback (most recent call last):
  File "/srv/paws/pwb/scripts/archivebot.py", line 793, in main
    archiver.run()
  File "/srv/paws/pwb/scripts/archivebot.py", line 659, in run
    whys = self.analyze_page()
  File "/srv/paws/pwb/scripts/archivebot.py", line 621, in analyze_page
    why = t.should_be_archived(self)
  File "/srv/paws/pwb/scripts/archivebot.py", line 398, in should_be_archived
    {'duration': duration})
  File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1738, in wrapper
    return obj(*__args, **__kw)
  File "/srv/paws/pwb/pywikibot/i18n.py", line 766, in twtranslate
    trans = _extract_plural(alt, trans, parameters)
  File "/srv/paws/pwb/pywikibot/i18n.py", line 518, in _extract_plural
    return re.sub(PLURAL_PATTERN, replace_plural, message)
  File "/usr/lib/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
  File "/srv/paws/pwb/pywikibot/i18n.py", line 470, in replace_plural
    num = parameters[selector]
KeyError: 'count'Dropped throttle(s).
Closing network session.
Network session closed.

Thank you.

Event Timeline

I've used my usual setup instead of PAWS this time, and worked:

pwb.py archivebot User:MiszaBot/config -page:"Talk:Admin activity review" -pt:1 -v
.\pywikibot\config2.py:1121: UserWarning: Configuration variable "proxy" is defined in your user-config.py but unknown. It can be a misspelled one or a variable that is no longer supported.
  .format(name), UserWarning)
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
Processing [[meta:Talk:Admin activity review]]
Found 1 meta:meta processes running, including this one.
10 thread(s) found on [[meta:Talk:Admin activity review]]
Looking for: {{User:MiszaBot/config}} in [[meta:Talk:Admin activity review]]
Processing 10 threads
Archiving 5 thread(s).
Page [[Talk:Admin activity review/Archives/2013]] saved
APISite("meta", "meta").login(False) called when a previous login was in progress.
Sleeping for 0.2 seconds, 2019-07-21 14:10:44
Page [[Talk:Admin activity review]] saved
Dropped throttle(s).
Closing network session.
Network session closed.

My local env is at fd0484c4 (master) so, could this be a PAWS -only issue?

It seems on PAWS there is no up-to-date pywikibot-i18n, needs git submodule update

It also seems pywikibot on PAWS is not really up-to-date, see the apropriate line in current master (it is different): https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/scripts/archivebot.py$396

It also seems pywikibot on PAWS is not really up-to-date, see the apropriate line in current master (it is different): https://phabricator.wikimedia.org/diffusion/PWBC/browse/master/scripts/archivebot.py$396

PAWS uses the “stable” release. I think the next update is coming soon after all test are passing recently.

Xqt triaged this task as Medium priority.Jul 21 2019, 1:19 PM
Xqt changed the subtype of this task from "Task" to "Bug Report".