Page MenuHomePhabricator

redirect.py: Script freezes without finishing processing pages
Closed, ResolvedPublic

Description

Command line:

python pwb.py redirect do -site:meta:meta

Output:

Retrieving double redirect special page...
Retrieving 30 pages from meta:meta.
  • The bot then processes the pages then outputs the following line:
Waiting for 9 pages to be put. Estimated time remaining: 0:00:09

Expected behavior:

  • The bot edits the pages on wiki then terminates successfully.

Actual behavior:

  • After printing the previous line, the bot freezes and does nothing (without editing the actual wiki).

Note:

  • The script worked correctly using the same command line arguments before. This bug is recent.
  • I recommend reviewing the latest changes in the code to see what caused this bug. (Maybe rPWBCfbc63bf3546e752a84c56ba0018080f04338b100 )

Event Timeline

Probably you aren't logged in and the bot waits for the password. I could reproduce the behaviour in this way. Anyway the async processing should wait until inputs are made. This is a regression against compat.

See T151727.

Probably you aren't logged in and the bot waits for the password. I could reproduce te behaviour in this way. Anyway the async processing should wait until inputs are done. This is a regression against compat.

See T151727.

You are totally right here. The problem disappeared after logging in the bot.

For the record, this is the steps I did:

python pwb.py login -site:meta:meta

Output:

WARNING: No user is logged in on site meta:meta
Password for user MenoBot on meta:meta (no characters will be shown):
Logging in to meta:meta as MenoBot
Logged in on meta:meta as MenoBot.

Then running the script normally:

python pwb.py redirect do -site:meta:meta

Output:

Retrieving double redirect special page...
Retrieving 30 pages from meta:meta.

Then the bot processes the pages, then outputs the following:

30 pages read
10 pages written
0 pages skipped
Execution time: 26 seconds
Read operation time: 0.9 seconds
Write operation time: 2.6 seconds
Script terminated successfully.
Xqt triaged this task as Lowest priority.Apr 18 2021, 4:20 PM

Nothing left to to here after the subtask is solved I guess.

Change 282818 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Port cache_output from compat

https://gerrit.wikimedia.org/r/282818

Change 282818 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Port cache_output from compat

https://gerrit.wikimedia.org/r/282818

Xqt claimed this task.
Xqt closed subtask T151727: Port cache_output from compat as Resolved.