Page MenuHomePhabricator

PageArchiver.maxsize should be defined before calling PageArchiver.load_config()
Closed, ResolvedPublicBUG REPORT

Description

This change rPWBC57a0f00827cedea37c35f2f63860ea2cbba5e943 seems to cause this error on every page:

ERROR: Error occurred while processing page [[fi:Keskustelu käyttäjästä:4shadoww]]
ERROR: AttributeError: 'PageArchiver' object has no attribute 'maxsize'
Traceback (most recent call last):
  File "/data/project/thanatos/pywikibot-core/scripts/archivebot.py", line 897, in main
    archiver = PageArchiver(pg, tmpl, salt, force)
  File "/data/project/thanatos/pywikibot-core/scripts/archivebot.py", line 528, in __init__
    self.load_config()
  File "/data/project/thanatos/pywikibot-core/scripts/archivebot.py", line 593, in load_config
    self.set_attr(item.strip(), value.strip())
  File "/data/project/thanatos/pywikibot-core/scripts/archivebot.py", line 557, in set_attr
    if size > self.maxsize:
AttributeError: 'PageArchiver' object has no attribute 'maxsize'Processing [[fi:Keskustelu käyttäjästä:4shadowwBOT]]

Changing maxsize variable to be defined before calling load_config() in __init__() seems to fix this problem.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
JJMC89 changed the subtype of this task from "Task" to "Bug Report".Mar 16 2021, 4:41 PM
4shadoww renamed this task from PageArchiver.maxsize should be defined before calling Page.Archiver.load_config() to PageArchiver.maxsize should be defined before calling PageArchiver.load_config().Mar 16 2021, 8:01 PM
Xqt triaged this task as High priority.Mar 17 2021, 8:11 AM

Change 673020 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] PageArchiver.maxsize must be defined before load_config()

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

JJMC89 removed a project: Patch-For-Review.

Change 673020 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] PageArchiver.maxsize must be defined before load_config()

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