https://bugzilla.wikimedia.org/show_bug.cgi?id=58818
Web browser: --- Bug ID: 58818 Summary: PYWP-10 Login needed for reading site, causing NoUsername exceptions Product: Pywikibot Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: blocker Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: wmf.bugconverter@gmail.com Classification: Unclassified Mobile Platform: ---
This issue was converted from https://jira.toolserver.org/browse/PYWP-10. Summary: Login needed for reading site, causing NoUsername exceptions Issue type: Bug - A problem which impairs or prevents the functions of the product. Priority: Blocker Status: Open Assignee: Merlijn van Deen valhallasw@arctus.nl
On Fri, 21 Jan 2011 22:18:49, Merlijn van Deen valhallasw@arctus.nl opened the following bug:
(pwbde)valhallasw@dorthonion:~/src/pwbde/pwb- flat/branches/rewrite/scripts$ cat test.py from pywikibot import Page, Site print Page(Site('de', 'wikipedia'), 'test').site (pwbde)valhallasw@dorthonion:~/src/pwbde/pwb- flat/branches/rewrite/scripts$ python test.py Traceback (most recent call last): File "test.py", line 2, in <module> print Page(Site('de', 'wikipedia'), 'test').site File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/page.py", line 94, in site return self._link.site File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/page.py", line 2358, in site self.parse() File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/page.py", line 2341, in parse if self._site.case() == 'first-letter': File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/site.py", line 970, in case return self.siteinfo['case'] File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/site.py", line 964, in siteinfo self._getsiteinfo() File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/site.py", line 921, in _getsiteinfo sidata = sirequest.submit() File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/data/api.py", line 219, in submit self.site.login(False) File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/site.py", line 703, in login user=self._username[sysop]) File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/__init__.py", line 124, in wrapper return method(*__args, **__kw) File "/home/valhallasw/src/pwbde /pwb-flat/branches/rewrite/pywikibot/__init__.py", line 124, in wrapper return method(*__args, **__kw) File "/home/valhallasw/src/pwbde/pwb- flat/branches/rewrite/pywikibot/login.py", line 105, in __init__ 'wiki_code': self.site.code}) pywikibot.exceptions.NoUsername: ERROR: Username for wikipedia:de is undefined. If you have an account for that site, please add a line to user-config.py: usernames['wikipedia']['de'] = 'myUsername'