[bugs:#1647] Unicode error with existing page title
Status: open
Created: Sun Jul 28, 2013 07:54 AM UTC by Adrián Chaves Fernández
Last Updated: Sun Jul 28, 2013 07:54 AM UTC
Owner: nobody
I have written the following script:
# -*- coding: utf-8 -*- import pywikibot site = pywikibot.Site("gl", "wiktionary") page = pywikibot.Page(site, u"𐌰𐌽𐌳𐌰𐌿𐍂𐌰") print page.get()
It fails with the following output:
[gallaecio@afonso fontes]$ python2 test.py Traceback (most recent call last): File "test.py", line 7, in <module> print page.get() File "/usr/lib/python2.7/site-packages/pywikibot/__init__.py", line 249, in wrapper return method(*__args, **__kw) File "/usr/lib/python2.7/site-packages/pywikibot/__init__.py", line 249, in wrapper return method(*__args, **__kw) File "/usr/lib/python2.7/site-packages/pywikibot/page.py", line 278, in get self._getInternals(sysop) File "/usr/lib/python2.7/site-packages/pywikibot/page.py", line 302, in _getInternals self.site.loadrevisions(self, getText=True, sysop=sysop) File "/usr/lib/python2.7/site-packages/pywikibot/page.py", line 96, in site return self._link.site File "/usr/lib/python2.7/site-packages/pywikibot/page.py", line 3080, in site self.parse() File "/usr/lib/python2.7/site-packages/pywikibot/page.py", line 3037, in parse u"contains illegal char(s) '%s'" % m.group(0)) pywikibot.exceptions.InvalidTitle: contains illegal char(s) '𐌰'
I’m using the rewrite branch, built today (2013-07-28).
Sent from sourceforge.net because Pywikipedia-bugs@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.