Last modified: 2014-05-06 00:44:19 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1608/ Reported by: cdpark Created on: 2013-04-04 01:32:44 Subject: interwiki() fails for closed wikipedia Assigned to: amird Original description: Page.interwiki\(\) and PageData.interwiki\(\) fails when wikidata contains sitelinks of closed wikipedias. For example, following code is broken now. \--------------------------------------------------------------------------------------------------- \#\!/usr/bin/python \# -\*- coding: utf-8 -\*- import pywikibot en = pywikibot.getSite\('en', 'wikipedia'\) mainpage = pywikibot.Page\(en, u'Main Page'\) interwiki = mainpage.interwiki\(\) print interwiki \--------------------------------------------------------------------------------------------------------------
- **assigned_to**: nobody --> amird
I posted this on the ML about a month ago \(http://lists.wikimedia.org/pipermail/pywikipedia-l/2013-March/007766.html\) and assumed that because no one responded it wasn't a big deal so I didn't bother fixing it. This issue is more than just interwiki links, it's that we prevent read \(and write for stewards\) access for a locked \(but readable\) wiki. I think the best way to fix it would be to split that list of obsolete wiki's into 3: locked, deleted, and obsolete \(renamed, backwards compatibility\), and then any wiki that is deleted/obsolete throw an error, but locked does not. \(Setting group to none since this also affects rewrite branch\)
- **milestone**: 346788 --> - **labels**: 745455 -->
The problem is from API: http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&titles=Main%20Page&prop=langlinks in comprehension of: http://en.wikipedia.org/w/api.php?action=query&format=jsonfm&titles=Persian%20Wikipedia&prop=langlinks legoktm: I think your idea is good but unrelated, none of these wikis are obsolete
Sorry, I misunderstood but every time i run the code on Main Page,bot returns me invalid title because the iws are invalid titles: http://en.wikipedia.org/w/index.php?title=Template:Main\_Page\_interwikis&action=edit can you give me another example \(e.g. a test userspace page\)
Change 112842 had a related patch set uploaded by Nullzero: Make obsolete site object can be created https://gerrit.wikimedia.org/r/112842
Change 112842 merged by jenkins-bot: Make obsolete site object can be created https://gerrit.wikimedia.org/r/112842
Patch reverted with https://gerrit.wikimedia.org/r/#/c/119277/
Merged