Page MenuHomePhabricator

Page.authorship() and Page.mainauthors() fails
Closed, ResolvedPublicBUG REPORT

Description

Page.authorship() and Page.mainauthors() fails and CI is blocked due to this issue.

https://integration.wikimedia.org/ci/job/pywikibot-core-tox-doctest/1640/console
https://integration.wikimedia.org/ci/job/pywikibot-core-tox-deeptest-py312/221/console

09:56:17 ________ [doctest] pywikibot.page._toolforge.WikiBlameMixin.authorship _________
09:56:17 120 
09:56:17 121         This method uses XTools/Authorship to retrieve the authors
09:56:17 122         measured by character count.
09:56:17 123 
09:56:17 124         Sample:
09:56:17 125 
09:56:17 126         >>> import pywikibot
09:56:17 127         >>> site = pywikibot.Site('wikipedia:en')
09:56:17 128         >>> page = pywikibot.Page(site, 'Pywikibot')
09:56:17 129         >>> auth = page.authorship()
09:56:17 UNEXPECTED EXCEPTION: Error('Unknown')
09:56:17 Traceback (most recent call last):
09:56:17   File "/opt/pyenv/versions/3.7.17/lib/python3.7/doctest.py", line 1337, in __run
09:56:17     compileflags, 1), test.globs)
09:56:17   File "<doctest pywikibot.page._toolforge.WikiBlameMixin.authorship[3]>", line 1, in <module>
09:56:17   File "/src/pywikibot/page/_toolforge.py", line 205, in authorship
09:56:17     raise pywikibot.exceptions.Error(msg) from None
09:56:17 pywikibot.exceptions.Error: Unknown
09:56:17 /src/pywikibot/page/_toolforge.py:129: UnexpectedException
09:56:17 _______ [doctest] pywikibot.page._toolforge.WikiBlameMixin.main_authors ________
09:56:17 070 Retrieve the 5 topmost main authors of an article.
09:56:17 071 
09:56:17 072         Sample:
09:56:17 073 
09:56:17 074         >>> import pywikibot
09:56:17 075         >>> site = pywikibot.Site('wikipedia:eu')
09:56:17 076         >>> page = pywikibot.Page(site, 'Python (informatika)')
09:56:17 077         >>> auth = page.main_authors()
09:56:17 UNEXPECTED EXCEPTION: Error('Unknown')
09:56:17 Traceback (most recent call last):
09:56:17   File "/opt/pyenv/versions/3.7.17/lib/python3.7/doctest.py", line 1337, in __run
09:56:17     compileflags, 1), test.globs)
09:56:17   File "<doctest pywikibot.page._toolforge.WikiBlameMixin.main_authors[3]>", line 1, in <module>
09:56:17   File "/src/pywikibot/tools/_deprecate.py", line 251, in wrapper
09:56:17     return obj(*args, **kwargs)
09:56:17   File "/src/pywikibot/tools/_deprecate.py", line 418, in wrapper
09:56:17     return obj(*__args, **__kw)
09:56:17   File "/src/pywikibot/page/_toolforge.py", line 107, in main_authors
09:56:17     {user: int(cnt) for user, (_, cnt) in self.authorship(5).items()})
09:56:17   File "/src/pywikibot/page/_toolforge.py", line 205, in authorship
09:56:17     raise pywikibot.exceptions.Error(msg) from None
09:56:17 pywikibot.exceptions.Error: Unknown
09:56:17 /src/pywikibot/page/_toolforge.py:77: UnexpectedException

Also most github action also fails: https://github.com/wikimedia/pywikibot/actions

Related Objects

StatusSubtypeAssignedTask
ResolvedBUG REPORTXqt
ResolvedBUG REPORTMusikAnimal

Event Timeline

Xqt triaged this task as High priority.Dec 2 2024, 11:40 AM
Xqt moved this task from Backlog to Reported Upstream on the Upstream board.
Xqt moved this task from Backlog to CI test failures on the Pywikibot-tests board.
Xqt moved this task from Backlog to Upstream issues on the Pywikibot board.

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

[pywikibot/core@master] tests: Skip wikiblame tests due to T381262

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

Xqt changed the subtype of this task from "Task" to "Bug Report".Dec 2 2024, 4:11 PM

Change #1099737 merged by Xqt:

[pywikibot/core@master] tests: Skip wikiblame tests due to T381262

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

Xqt lowered the priority of this task from High to Low.Dec 2 2024, 5:13 PM

unittest.expectedFailure decorators were added

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

[pywikibot/core@master] Revert "tests: Skip wikiblame tests due to T381262"

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

Xqt claimed this task.

Change #1099780 merged by Xqt:

[pywikibot/core@master] Revert "tests: Skip wikiblame tests due to T381262"

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