Bugs item #2937832, was opened at 2010-01-23 10:22 Message generated for change (Tracker Item Submitted) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2937832...
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: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: HTTP Error 502: Bad Gateway
Initial Comment: Recently replace.py halts for Bad Gateway pretty often. It halts about 2/3 times every 500 updated pages, so I have to restart the script over and over in order to complete long tasks. The problem is that it does not retry or skip the page, but it just stops the script execution. Is it possible to manage the http 502 in order to retry for page update at least 5 (or more) times? Thanks!
Updating page [[6579 Benedix]] via API Result: 502 Bad Gateway Traceback (most recent call last): File "C:\pywikipedia\replace.py", line 719, in <module> main() File "C:\pywikipedia\replace.py", line 714, in main bot.run() File "C:\pywikipedia\replace.py", line 438, in run page.put(new_text, self.editSummary) File "C:\pywikipedia\wikipedia.py", line 1655, in put newPage, self.site().getToken(sysop = sysop), sysop = sysop, botflag=botflag, maxTries=maxTries) File "C:\pywikipedia\wikipedia.py", line 1752, in _putPage response, data = query.GetData(params, self.site(), sysop=sysop, back_response = True) File "C:\pywikipedia\query.py", line 122, in GetData res, jsontext = site.postForm(path, params, sysop, site.cookies(sysop = sysop) ) File "C:\pywikipedia\wikipedia.py", line 5761, in postForm cookies=cookies) File "C:\pywikipedia\wikipedia.py", line 5805, in postData f = MyURLopener.open(request) File "C:\Python26\lib\urllib2.py", line 389, in open response = meth(req, response) File "C:\Python26\lib\urllib2.py", line 502, in http_response 'http', request, response, code, msg, hdrs) File "C:\Python26\lib\urllib2.py", line 427, in error return self._call_chain(*args) File "C:\Python26\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "C:\Python26\lib\urllib2.py", line 510, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 502: Bad Gateway
C:\pywikipedia>version.py Pywikipedia [http] trunk/pywikipedia (r7887, 2010/01/21, 17:47:24) Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2937832...
pywikipedia-bugs@lists.wikimedia.org