Page MenuHomePhabricator

"MaxTriesExceededError" in catimages.py during debug info/log output
Closed, ResolvedPublic

Description

Author: dr.trigon

Description:
At the end of all runs a log output is created as further info for debug and development purposes. This worked initially but now since several months generated following error:

2013-11-23 21:06:54 wikipedia.py, 2335 in _putPage: INFO Updating page [[User:DrTrigon/User:DrTrigonBot/logging]] via API
2013-11-23 21:08:43 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:08:43 wikipedia.py, 7044 in postData: WARNING Could not open 'https://commons.wikimedia.org/w/api.php'.
Maybe the server is down. Retrying in 1 minutes...
2013-11-23 21:11:38 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:11:38 wikipedia.py, 7044 in postData: WARNING Could not open 'https://commons.wikimedia.org/w/api.php'.
Maybe the server is down. Retrying in 2 minutes...
2013-11-23 21:15:32 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:15:32 wikipedia.py, 7044 in postData: WARNING Could not open 'https://commons.wikimedia.org/w/api.php'.
Maybe the server is down. Retrying in 4 minutes...
2013-11-23 21:21:26 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:21:26 wikipedia.py, 7044 in postData: WARNING Could not open 'https://commons.wikimedia.org/w/api.php'.
Maybe the server is down. Retrying in 8 minutes...
2013-11-23 21:31:21 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:31:21 wikipedia.py, 7044 in postData: WARNING Could not open 'https://commons.wikimedia.org/w/api.php'.
Maybe the server is down. Retrying in 16 minutes...
2013-11-23 21:49:11 wikipedia.py, 7037 in postData: INFO HTTPError: 504 Gateway Time-out
2013-11-23 21:49:11 catimages.py, 4572 in <module>: INFO Execution time: 6173
2013-11-23 21:49:11 pwb.py, 169 in <module>: ERROR MaxTriesExceededError
Traceback (most recent call last):

File "/home/drtrigon/pywikipedia/pwb.py", line 163, in <module>
  execfile(sys.argv[0])
File "/home/drtrigon/pywikipedia/catimages.py", line 4565, in <module>
  main()
File "/home/drtrigon/pywikipedia/catimages.py", line 4420, in main
  outpage.put(tmp[:pos], comment="bot writing log for last run")
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 2243, in put
  sysop=sysop, botflag=botflag, maxTries=maxTries)
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 2340, in _putPage
  back_response=True)
File "/home/drtrigon/pywikibot-compat/pywikibot/support.py", line 121, in wrapper
  return method(*__args, **__kw)
File "/home/drtrigon/pywikibot-compat/query.py", line 139, in GetData
  site.cookies(sysop=sysop))
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 6977, in postForm
  cookies=cookies)
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 7041, in postData
  raise MaxTriesExceededError()

MaxTriesExceededError

Also splitting up the data into several smaller bunches did not help.


Version: compat-(1.0)
Severity: normal

Details

Reference
bz57495

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:40 AM
bzimport set Reference to bz57495.
bzimport added a subscriber: Unknown Object (????).

dr.trigon wrote:

Now it produces also this message (always!):

2013-12-01 21:05:32 pwb.py, 169 in <module>: ERROR EditConflict: An edit conflict has occured.
Traceback (most recent call last):

File "/home/drtrigon/pywikipedia/pwb.py", line 163, in <module>
  execfile(sys.argv[0])
File "/home/drtrigon/pywikipedia/catimages.py", line 4571, in <module>
  main()
File "/home/drtrigon/pywikipedia/catimages.py", line 4423, in main
  outpage.put(tmp[:pos], comment="bot writing log for last run")
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 2243, in put
  sysop=sysop, botflag=botflag, maxTries=maxTries)
File "/home/drtrigon/pywikibot-compat/wikipedia.py", line 2422, in _putPage
  raise EditConflict(u'An edit conflict has occured.')

EditConflict: An edit conflict has occured.

Aklapper triaged this task as Lowest priority.Jun 5 2015, 1:41 PM
Aklapper subscribed.

Pywikibot has two versions: Compat and Core. This task was filed about the older version, called Pywikibot-compat, which is not under active development anymore. Hence I'm lowering the priority of this task to reflect the reality. Unfortunately, the Pywikibot team does not have the manpower to retest every single bug report / feature request against the (maintained) Pywikibot code base. Furthermore, the code base of Pywikibot-Compat has changed a lot compared to the code base of Pywikibot-Core so there is a chance that the problem described in this task might not exist anymore. Please help: Unfortunately manpower is limited and does not allow testing every single reported task again. If you have time and interest in Pywikibot, please upgrade to Pywikibot-Core and add a comment to this task if the problem in this task still happens in Pywikibot-Core (or directly edit the task by removing the Pywikibot-compat project and adding the Pywikibot project to this task). To learn more about Pywikibot and to get involved in its development, please check out https://www.mediawiki.org/wiki/Manual:Pywikibot/Development Thank you for your understanding.

Xqt assigned this task to DrTrigon.
Xqt subscribed.

patches where merged