Page MenuHomePhabricator

_update_page takes exactly 3 arguments (4 given)
Closed, ResolvedPublic

Description

File "pywikibot\pywikibot\site.py", line 1357, in callee
  return fn(self, *args, **kwargs)
File "pywikibot\pywikibot\page.py", line 2673, in isEmptyCategory
  ci = self.categoryinfo
File "pywikibot\pywikibot\page.py", line 2783, in categoryinfo
  return self.site.categoryinfo(self)
File "pywikibot\pywikibot\site.py", line 3999, in categoryinfo
  self.getcategoryinfo(category)
File "pywikibot\pywikibot\site.py", line 3994, in getcategoryinfo
  self._update_page(category, ciquery, 'categoryinfo')
TypeError: _update_page() takes exactly 3 arguments (4 given)

This seems to be related to 9aab25f1b02098c4484488288ea885cf703bde40

I made the following two changes and the error went away.

@@ -2979,11 +2979,11 @@ class APISite(BaseSite):
-        self._update_page(page, query, 'loadflowinfo')
+        self._update_page(page, query)
 
@@ -3989,11 +3989,11 @@ class APISite(BaseSite):
-        self._update_page(category, ciquery, 'categoryinfo')
+        self._update_page(category, ciquery)

Event Timeline

Prod created this task.Oct 7 2016, 1:36 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 7 2016, 1:36 AM
whym added a comment.Oct 8 2016, 1:45 AM

@Prod: you are right, it was my oversight. Do you want to submit it as a patch using Gerrit? If you can, I will be able to quickly merge it.

Change 314854 had a related patch set uploaded (by Xqt):
[bugfix] remove 3rd parameter from _update_page call

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

Xqt reassigned this task from whym to Prod.Oct 9 2016, 10:37 AM
Xqt closed this task as Resolved.
Xqt triaged this task as High priority.
Xqt added a subscriber: whym.

Change 314854 merged by jenkins-bot:
[bugfix] remove 3rd parameter from _update_page call

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