https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
Web browser: --- Bug ID: 61120 Summary: pywikibot.Link.langlinkUnsafe can't deal with obsolete sites Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: nullzero.free@gmail.com Classification: Unclassified Mobile Platform: ---
print list(pywikibot.Page(pywikibot.getSite("af"), "Maan").iterlanglinks()) raises NoSuchSite exception
I actually encountered this problem when I ran featured.py. It seems that there is an attempt (gerrit: 112322) to fix this problem, but the problem still persists.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
--- Comment #1 from Sorawee Porncharoenwase nullzero.free@gmail.com --- Oh! I forgot to mention that the above code fails because iterlanglinks() will call pywikibot.Link.langlinkUnsafe.
There are two places calling pywikibot.Link.langlinkUnsafe: in iterlanglinks() and in update_page() from api.py. I don't which way is better between putting try-except block inside pywikibot.Link.langlinkUnsafe directly, and putting try-except block in caller functions over pywikibot.Link.langlinkUnsafe.
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |55146
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |57050
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112842 had a related patch set uploaded by Nullzero: Prevent NoSuchSite error from reading obsolete site's language link
https://gerrit.wikimedia.org/r/112842
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |PATCH_TO_REVIEW Ever confirmed|0 |1
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
--- Comment #3 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 112842 merged by jenkins-bot: Make obsolete site object can be created
https://gerrit.wikimedia.org/r/112842
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |---
--- Comment #4 from xqt info@gno.de --- Patch reverted with https://gerrit.wikimedia.org/r/#/c/119277/
https://bugzilla.wikimedia.org/show_bug.cgi?id=61120
Sorawee Porncharoenwase nullzero.free@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Sorawee Porncharoenwase nullzero.free@gmail.com --- Merged
pywikipedia-bugs@lists.wikimedia.org