Last modified: 2014-07-24 15:31:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70440, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68440 - Site().category_redirects() KeyError
Site().category_redirects() KeyError
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized major
: ---
Assigned To: Ricordisamoa
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-23 13:26 UTC by Russell Blau
Modified: 2014-07-24 15:31 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Russell Blau 2014-07-23 13:26:11 UTC
As the subject line says -- I don't know which commit caused this, but it has to have been within the past 24 hours or so; this error is occurring on Tools Labs, which I believe is updated from the git repository daily.

Python 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywikibot
>>> s = pywikibot.Site()
>>> s
Site("en", "wikipedia")
>>> s.category_redirects()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/shared/pywikipedia/rewrite/pywikibot/site.py", line 250, in <lambda>
    f = lambda *args, **kwargs: method(self.code, *args, **kwargs)
  File "/shared/pywikipedia/rewrite/pywikibot/family.py", line 877, in category_redirects
    self.get_cr_templates(code, fallback)
  File "/shared/pywikipedia/rewrite/pywikibot/family.py", line 896, in get_cr_templates
    cr_page = pywikibot.Page(pywikibot.Site(code, self),
  File "/shared/pywikipedia/rewrite/pywikibot/__init__.py", line 468, in Site
    user = user or config.usernames[fam].get(code, None) \
KeyError: Family("wikipedia")

version.py outputs:

Pywikibot: [https] r-p-pywikibot-core.git (64df203, g3569, 2014/07/22, 15:07:48, ok)
Release version: 2.0b1
Python: 2.7.3 (default, Feb 27 2014, 19:58:35) 
[GCC 4.6.3]
unicode test: ok
Comment 1 Gerrit Notification Bot 2014-07-24 13:36:07 UTC
Change 148994 had a related patch set uploaded by Ricordisamoa:
fix lookup of family in config.usernames and config.sysopnames

https://gerrit.wikimedia.org/r/148994
Comment 2 Gerrit Notification Bot 2014-07-24 15:29:19 UTC
Change 148994 merged by Russell Blau:
fix lookup of family in config.usernames and config.sysopnames

https://gerrit.wikimedia.org/r/148994

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links