I have a bot (using mwclient 0.6.2) that nightly updates some status pages on WikiEducator.org. It has suddenly started failing with an 'Edit conflict' but I can edit the page by hand and the script continues to write to another page. Are there things that would prohibit the API from writing to a page but still allow editing through the wiki?
MediaWiki 1.14
On Thu, Jul 16, 2009 at 11:20 PM, Jim Tittslerjt@onnz.net wrote:
I have a bot (using mwclient 0.6.2) that nightly updates some status pages on WikiEducator.org. It has suddenly started failing with an 'Edit conflict' but I can edit the page by hand and the script continues to write to another page. Are there things that would prohibit the API from writing to a page but still allow editing through the wiki?
MediaWiki 1.14
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Yes. Specifically, an edit conflict will cause one attempt to fail and the next to succeed with no problem. For details see http://en.wikipedia.org/wiki/Help:Edit_conflict but essentially someone else changed the page while you were editing it and the wiki wants you to make sure you don't accidentally overwrite their changes.
On 17/07/09 16:18, Dan Collins wrote:
On Thu, Jul 16, 2009 at 11:20 PM, Jim Tittslerjt@onnz.net wrote:
I have a bot (using mwclient 0.6.2) that nightly updates some status pages on WikiEducator.org. It has suddenly started failing with an 'Edit conflict' but I can edit the page by hand and the script continues to write to another page. Are there things that would prohibit the API from writing to a page but still allow editing through the wiki?
Yes. Specifically, an edit conflict will cause one attempt to fail and the next to succeed with no problem. For details see http://en.wikipedia.org/wiki/Help:Edit_conflict but essentially someone else changed the page while you were editing it and the wiki wants you to make sure you don't accidentally overwrite their changes.
I think there is something else going on. Writing to this particular page now *always* fails through the API. It always succeeds when I edit through the web. The history of the page says only the bot and my test edits have been performed on the page. The bot continues to write to other pages. Are there other conditions that get reported as edit conflicts?
Could you be passing an improper timestamp in the post request?
On Fri, Jul 17, 2009 at 4:49 PM, Jim Tittsler jt@onnz.net wrote:
On 17/07/09 16:18, Dan Collins wrote:
On Thu, Jul 16, 2009 at 11:20 PM, Jim Tittslerjt@onnz.net wrote:
I have a bot (using mwclient 0.6.2) that nightly updates some status pages on WikiEducator.org. It has suddenly started failing with an 'Edit conflict' but I can edit the page by hand and the script continues to write to another page. Are there things that would prohibit the API from writing to a page but still allow editing through the wiki?
Yes. Specifically, an edit conflict will cause one attempt to fail and the next to succeed with no problem. For details see http://en.wikipedia.org/wiki/Help:Edit_conflict but essentially someone else changed the page while you were editing it and the wiki wants you to make sure you don't accidentally overwrite their changes.
I think there is something else going on. Writing to this particular page now *always* fails through the API. It always succeeds when I edit through the web. The history of the page says only the bot and my test edits have been performed on the page. The bot continues to write to other pages. Are there other conditions that get reported as edit conflicts?
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
On Sat, Jul 18, 2009 at 08:49:48AM +1200, Jim Tittsler wrote:
On 17/07/09 16:18, Dan Collins wrote:
On Thu, Jul 16, 2009 at 11:20 PM, Jim Tittslerjt@onnz.net wrote:
I have a bot (using mwclient 0.6.2) that nightly updates some status pages on WikiEducator.org. It has suddenly started failing with an 'Edit conflict' but I can edit the page by hand and the script continues to write to another page. Are there things that would prohibit the API from writing to a page but still allow editing through the wiki?
Yes. Specifically, an edit conflict will cause one attempt to fail and the next to succeed with no problem. For details see http://en.wikipedia.org/wiki/Help:Edit_conflict but essentially someone else changed the page while you were editing it and the wiki wants you to make sure you don't accidentally overwrite their changes.
I think there is something else going on. Writing to this particular page now *always* fails through the API. It always succeeds when I edit through the web. The history of the page says only the bot and my test edits have been performed on the page. The bot continues to write to other pages. Are there other conditions that get reported as edit conflicts?
Are you correctly supplying both the basetimestamp and starttimestamp parameters to the action=edit call?
On 18/07/09 10:31, Brad Jorsch wrote:
Are you correctly supplying both the basetimestamp and starttimestamp parameters to the action=edit call?
I confess I don't really know. mwclient has always handled this transparently for me. I'll investigate further.
Thanks to you and Betacommand for the suggestion.
P.S. I've discovered I can write the same content to another page (the original title with a '2' appended). It is just like this one particular page has somehow become locked to API writes.
mediawiki-api@lists.wikimedia.org