Bugs item #3449465, was opened at 2011-12-03 08:17 Message generated for change (Tracker Item Submitted) made by drtrigon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3449465...
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: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dr. Trigon (drtrigon) Assigned to: Nobody/Anonymous (nobody) Summary: Error in user.contributions
Initial Comment: Pywikipedia [https] svn.toolserver.org/svnroot/drtrigon/pywikipedia (r218, 2011/11/26, 17:57:39) Python 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) [GCC 4.6.0 20110331 (Red Hat 4.6.0-2)] config-settings: use_api = True use_api_login = True unicode test: triggers problem #3081100
The following code:
site = pywikibot.getSite() usr = userlib.User(site, u'BLUbot') for item in usr.contributions(limit = 2000): print item
raises an error:
Traceback (most recent call last): File "./tests/dtbext_tester.py", line 500, in <module> experimental() File "./tests/dtbext_tester.py", line 328, in experimental for item in usr.contributions(limit = 2000): File "./userlib.py", line 292, in contributions % (params['uclimit'], self.site())) TypeError: %d format: a number is required, not unicode
mainly because of the '%d' not beeing a '%s'. But the strange thing is why 'params['uclimit']' magically becomes unicode after first iteration and getting a bunch of 500 pages.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3449465...