Error:
$ ./test_page.py family and mylang are not set. Defaulting to family='test' and mylang='test'. Traceback (most recent call last): File "./test_page.py", line 7, in <module> page = pywikibot.Page(site, "Beyoncé Knowles") File "/home/dan/work/pywikibot/core/pywikibot/tools/__init__.py", line 1476, in wrapper return obj(*__args, **__kw) File "/home/dan/work/pywikibot/core/pywikibot/page.py", line 2242, in __init__ super(Page, self).__init__(source, title, ns) File "/home/dan/work/pywikibot/core/pywikibot/page.py", line 199, in __init__ self._link = Link(title, source=source, defaultNamespace=ns) File "/home/dan/work/pywikibot/core/pywikibot/page.py", line 5439, in __init__ if u"|" in self._text: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6: ordinal not in range(128) <type 'exceptions.UnicodeDecodeError'> CRITICAL: Closing network session.
Test code:
#!/usr/bin/env python # *-* encoding: utf-8 import pywikibot site = pywikibot.Site('en', 'wikipedia') page = pywikibot.Page(site, "Beyoncé Knowles")