[Pywikipedia-bugs] [ pywikipediabot-Bugs-3426499 ] Fetching user contributions fails with KeyError
SourceForge.net
noreply at sourceforge.net
Sat Oct 22 10:17:00 UTC 2011
Bugs item #3426499, was opened at 2011-10-20 20:30
Message generated for change (Comment added) made by xqt
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: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Morten Wang (nettrom)
>Assigned to: xqt (xqt)
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.
----------------------------------------------------------------------
>Comment By: xqt (xqt)
Date: 2011-10-22 12:17
Message:
same as bug ##3097185 on trunk version. Fixed with r9643.
----------------------------------------------------------------------
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