https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Web browser: --- Bug ID: 57879 Summary: impossible to run solve_disambiguation.py on redirects Product: Pywikibot Version: compat (1.0) Hardware: All OS: All Status: NEW Severity: blocker Priority: Unprioritized Component: solve_disambiguation.py Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: hercule.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Since yesterday I can't run solve_disambiguation.py with -redir option. The command line is :
python solve_disambiguation.py -redir Agence France Presse
The error stack is :
Traceback (most recent call last): File "solve_disambiguation.py", line 1147, in <module> main() File "solve_disambiguation.py", line 1142, in main bot.run() File "solve_disambiguation.py", line 1018, in run if not self.findAlternatives(disambPage): File "solve_disambiguation.py", line 897, in findAlternatives target = disambPage.getRedirectTarget().title() File "/data/project/herculebot/pywikibot-compat/wikipedia.py", line 3120, in getRedirectTarget target = err[0].replace('&quot;', '"') AttributeError: 'IsRedirectPage' object has no attribute 'replace'
version.Py output is : Pywikibot: [https] r/pywikibot/compat (r10559, 341ed66, 2013/12/01, 19:41:39, OUTDATED) Release version: 1.0b1 Python: 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] config-settings: use_api = True use_api_login = True unicode test: ok
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de Severity|blocker |major
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #1 from xqt info@gno.de --- -redir is not a valid option of the actual framework. Could you explain.
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #2 from Hercule hercule.wikipedia@gmail.com --- -redir is an option to indicate that the script run from a redirect.
See the documentation : http://www.mediawiki.org/wiki/Manual:Pywikibot/solve_disambiguation.py
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High Assignee|Pywikipedia-bugs@lists.wiki |info@gno.de |media.org |
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|solve_disambiguation.py |General Assignee|info@gno.de |Pywikipedia-bugs@lists.wiki | |media.org
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98813 had a related patch set uploaded by Xqt: (bug 57879): raise the right form for isRedirectPage exception
https://gerrit.wikimedia.org/r/98813
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Hercule hercule.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|High |Unprioritized Status|PATCH_TO_REVIEW |NEW Component|General |solve_disambiguation.py
--- Comment #4 from Hercule hercule.wikipedia@gmail.com --- I discover that this parameter is inactive since 8 years...
https://git.wikimedia.org/commitdiff/pywikibot%2Fcompat.git/0e153e659cf6f6b7...
So the correct description of the bug is that launching solve_disambiguation.py from a redirect crashes. Few days ago there was no problem
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Hercule hercule.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High Status|NEW |PATCH_TO_REVIEW Component|solve_disambiguation.py |General
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98814 had a related patch set uploaded by Ladsgroup: Fast fixation of the Bug: 57879
https://gerrit.wikimedia.org/r/98814
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #6 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98814 merged by jenkins-bot: Fast fixation of the Bug: 57879
https://gerrit.wikimedia.org/r/98814
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Amir Ladsgroup ladsgroup@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|High |Unprioritized Status|PATCH_TO_REVIEW |NEW CC| |ladsgroup@gmail.com Component|General |solve_disambiguation.py
--- Comment #7 from Amir Ladsgroup ladsgroup@gmail.com --- can you update your codes and run it again?
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #8 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98818 had a related patch set uploaded by Xqt: Revert "Fast fixation of the Bug: 57879"
https://gerrit.wikimedia.org/r/98818
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #9 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98818 merged by Xqt: Revert "Fast fixation of the Bug: 57879"
https://gerrit.wikimedia.org/r/98818
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|solve_disambiguation.py |General
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #10 from Amir Ladsgroup ladsgroup@gmail.com --- sorry for this issue. I just wanted to help :(
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #11 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 98813 merged by jenkins-bot: (bug 57879): raise the right form for isRedirectPage exception
https://gerrit.wikimedia.org/r/98813
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #12 from Merlijn van Deen valhallasw@arctus.nl --- Just a note on this for future reference.
- Page._redirarg can be either str or IsRedirectError(str, ), depending on where it is set - If Page._redirarg is set, it is used to re-throw the error when page.get() (et al.) are called a second time.
The old syntax throw IsRedirectError, e
will throw IsRedirectError(e) if e is str, or IsRedirectError(e.msg) if e is Exception.
The new syntax throw IsRedirectError(e)
will *always* throw IsRedirectError(e), which will therefore result in IsRedirectError(IsRedirectError(page title)) if e is Exception.
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #13 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 104344 had a related patch set uploaded by Xqt: notice for bug 57879
https://gerrit.wikimedia.org/r/104344
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |PATCH_TO_REVIEW Resolution|FIXED |---
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=57879
--- Comment #14 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 104344 merged by jenkins-bot: notice for bug 57879
https://gerrit.wikimedia.org/r/104344
pywikipedia-bugs@lists.wikimedia.org