Bugs item #3041406, was opened at 2010-08-08 09:59 Message generated for change (Tracker Item Submitted) made by silvonen You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3041406...
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: Mikko Silvonen (silvonen) Assigned to: Nobody/Anonymous (nobody) Summary: NameError in postData: no_hostname is not defined
Initial Comment: There seems to be an error in the error handling of postData() in wikipedia.py:
Getting 60 pages from wikipedia:ru... 'utf8' codec can't decode byte 0xd0 in position 353351: unexpected end of data Traceback (most recent call last): File "c:\svn\pywikipedia\pagegenerators.py", line 1232, in __iter__ for loaded_page in self.preload(somePages): File "c:\svn\pywikipedia\pagegenerators.py", line 1257, in preload pywikibot.getall(site, pagesThisSite) File "c:\svn\pywikipedia\wikipedia.py", line 4137, in getall _GetAll(site, pages, throttle, force).run() File "c:\svn\pywikipedia\wikipedia.py", line 3782, in run data = self.getData() File "c:\svn\pywikipedia\wikipedia.py", line 3953, in getData response, data = self.site.postForm(address, predata) File "c:\svn\pywikipedia\wikipedia.py", line 4974, in postForm cookies=self.cookies(sysop = sysop)) File "c:\svn\pywikipedia\wikipedia.py", line 5099, in postData if no_hostname: NameError: global name 'no_hostname' is not defined global name 'no_hostname' is not defined
python version.py
Pywikipedia [http] trunk/pywikipedia (r8388, 2010/08/07, 16:08:55) Python 2.5.4 (r254:67916, Jan 29 2009, 12:02:11) [MSC v.1310 32 bit (Intel)] config-settings: use_api = True use_api_login = True
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3041406...
pywikipedia-bugs@lists.wikimedia.org