https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
Web browser: --- Bug ID: 55133 Summary: Parsing error for Link instances Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1643/ Reported by: xqt Created on: 2013-07-14 14:07:44.612000 Subject: Parsing error for Link instances Original description: I get a parsing error for Link.parse() e.g. for the following statements:
import pwb; import pywikibot as wp l = wp.Link(u'w:de:Foo') l
Traceback (most recent call last): File "<pyshell#135>", line 1, in <module> l File "pywikibot\page.py", line 2931, in __repr__ return "pywikibot.page.Link(%r, %r)" % (self.title, self.site) File "pywikibot\page.py", line 3101, in title self.parse() File "pywikibot\page.py", line 3007, in parse % self._text) Error: Improperly formatted interwiki link 'w:de:Foo'
using wikipedia: instead of w: the Link is wrong:
l = wp.Link(u'wikipedia:de:Foo') l
pywikibot.page.Link(u'De:Foo', Site("de", "wikipedia"))
It works right for wikt: and wiktionary:
l = wp.Link(u'wikt:de:Foo') l
pywikibot.page.Link(u'Foo', Site("de", "wiktionary"))
l = wp.Link(u'wikt:de:Foo') l
pywikibot.page.Link(u'Foo', Site("de", "wiktionary"))
l = wp.Link(u'wiktionary:de:Foo') l
pywikibot.page.Link(u'Foo', Site("de", "wiktionary"))
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- working for me, still a bug?
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1643
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
Ricordisamoa ricordisamoa@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de, | |ricordisamoa@live.it
--- Comment #2 from Ricordisamoa ricordisamoa@live.it --- @Xqt: if you have set family = 'wikipedia' and mylang = 'de' in your user-config.py, the parser may get confused about interwiki links to the same family.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Priority|Unprioritized |High Version|unspecified |core (2.0)
--- Comment #3 from xqt info@gno.de --- Anyway either u'w:de:Foo' or u'wikipedia:de:Foo' are valid links and Link.parse() should be able to deal with them
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
--- Comment #4 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 149629 had a related patch set uploaded by John Vandenberg: Add basic tests for Link(), with 34 errors
https://gerrit.wikimedia.org/r/149629
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |70936
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 149629 merged by jenkins-bot: Add basic tests for Link(), with 20 errors
https://gerrit.wikimedia.org/r/149629
https://bugzilla.wikimedia.org/show_bug.cgi?id=55133
John Mark Vandenberg jayvdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |NEW
--- Comment #6 from John Mark Vandenberg jayvdb@gmail.com --- Tests in; time for some fixes.
pywikipedia-bugs@lists.wikimedia.org