---
** [bugs:#1643] Parsing error for Link instances**
**Status:** open
**Created:** Sun Jul 14, 2013 02:07 PM UTC by xqt
**Last Updated:** Sun Jul 14, 2013 02:07 PM UTC
**Owner:** nobody
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"))
>>
---
Sent from
sourceforge.net because Pywikipedia-bugs(a)lists.wikimedia.org is subscribed to
https://sourceforge.net/p/pywikipediabot/bugs/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/pywikipediabot/admin/bugs/options. Or, if this is a mailing
list, you can unsubscribe from the mailing list.