Menu

#1399 Updating complex pages

open
nobody
General (277)
4
2012-01-20
2012-01-17
No

When updating complex pages, it's common to get a Timeout, because the Wikimedia server does not process and return the page within the expected time. In suchs cases (when a timeout exception is thrown), my suggestion si that pywikipedia should try to fetch the page again and check if there are any differences against the new page to be saved. If not, then it should proceed and not block indefinitely in such pages.

Discussion

  • xqt

    xqt - 2012-01-20

    This is the way the bot works. It trys to put the page for several times which is given by maxretries in the (user_)config.py. Edit conflicts are detected (by the mw api) except you are using your bot account for multiple edits on the same page in the same time.

     
  • xqt

    xqt - 2012-01-20
    • status: open --> pending
     
  • André Malafaya Baptista

    • status: pending --> open
     
  • André Malafaya Baptista

    Hmmm, I'm not sure you understood. I'm not updating the page more than once simultaneoulsy. It's just one bot run. As the page is a complicated one, the server does not respond on time (you can try [[Europa]] at pt.wiktionary). The bot then tries again, but obviously the same happens. The difference is that the page has already been updated in the first try, even if the server has not responded. In operations such as replace.py, where it's common to edit long pages, you get in a long loop.

     
  • André Malafaya Baptista

    I'm talking about this error:

    Updating page [[Sri Lanka]] via API
    HTTPError: 504 Gateway Time-out

    The page to be updated is quite big so the server does not reply on time.
    1) Is there a way to increase the timeout? I believe this is controlled by the server, not the HTTP client...
    2) The page was updated on the first try but as the page is not refreshed between retries, the bot doesn't know and will try to update it "forever"

     

Log in to post a comment.