[Pywikipedia-bugs] [ pywikipediabot-Bugs-3426499 ] Fetching user contributions fails with KeyError

SourceForge.net noreply at sourceforge.net
Thu Oct 20 18:30:09 UTC 2011


Bugs item #3426499, was opened at 2011-10-20 20:30
Message generated for change (Tracker Item Submitted) made by nettrom
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3426499&group_id=93107

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: rewrite
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Morten Wang (nettrom)
Assigned to: Russell Blau (russblau)
Summary: Fetching user contributions fails with KeyError

Initial Comment:
User en:Cncplayer has made a contribution with a deleted comment (see http://en.wikipedia.org/wiki/Special:Contributions/Cncplayer, edit on 2011-10-19 at 07:09).  Instantiating a User object and asking to fetch the contributions fails with a KeyError, as seen here:

>>> import pywikibot
>>> mySite = pywikibot.getSite('en');
>>> myUser = pywikibot.User(mySite, 'Cncplayer');
>>> contribs = myUser.contributions();
>>> contribs.next();
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/somepath/python-modules/lib/python/Pywikipediabot-2.0alpha-py2.7.egg/pywikibot/page.py", line 2087, in contributions
    contrib['revid'], ts, contrib['comment']
KeyError: 'comment'

I'm running the rewrite branch and just updated to revision 9636 to confirm that the error happens there too.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3426499&group_id=93107



More information about the Pywikipedia-bugs mailing list