Page MenuHomePhabricator

delete.py asking for credentials before each deletion every time
Closed, DuplicatePublic

Description

>>> MediaWiki:Allnonarticles <<<
WARNING: There are 1 pages who link to [[eu:MediaWiki:Allnonarticles]].
    User:    [2]          1 page
Do you want to delete [[eu:MediaWiki:Allnonarticles]]? ([y]es, [N]o, [a]ll, [q]uit): y
Logging in to wikiquote:eu as MarcoAurelio@MarcoAurelio
Sleeping for 4.8 seconds, 2017-06-25 14:22:25


>>> MediaWiki:Allnotinnamespace <<<
WARNING: There are 1 pages who link to [[eu:MediaWiki:Allnotinnamespace]].
    User:    [2]          1 page
Do you want to delete [[eu:MediaWiki:Allnotinnamespace]]? ([y]es, [N]o, [a]ll, [q]uit): y
Logging in to wikiquote:eu as MarcoAurelio@MarcoAurelio
ERROR: Login failed (Aborted).
Password for user MarcoAurelio@MarcoAurelio on wikiquote:eu (no characters will be shown):

This is pretty annoying. I have to type each time the password for the bot to delete the page. Given that I couldn't make this work via OAuth (sysop is not supported by OAuth, console said); I tried with botpasswords with the advice given at https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords and the result is what you can see above.

I guess this is equal/related to T150645: BotPasswords login fails in Pywikibot core ? In that case this needs fixing.

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptJun 25 2017, 12:28 PM
MarcoAurelio triaged this task as High priority.Jun 25 2017, 12:30 PM

With OAuth:

>>> MediaWiki:Allnotinnamespace <<<
WARNING: There are 1 pages who link to [[eu:MediaWiki:Allnotinnamespace]].
    User:    [2]          1 page
Do you want to delete [[eu:MediaWiki:Allnotinnamespace]]? ([y]es, [N]o, [a]ll, [q]uit): y

11 pages read
0 pages written
Execution time: 4 seconds
Read operation time: 0 seconds
Script terminated by exception:

ERROR: NoUsername: No sysop is permitted with OAuth
Traceback (most recent call last):
  File "F:\MABot\pwb.py", line 262, in <module>
    if not main():
  File "F:\MABot\pwb.py", line 255, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "F:\MABot\pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\delete.py", line 306, in <module>
    main()
  File ".\scripts\delete.py", line 298, in main
    bot.run()
  File "F:\MABot\pywikibot\bot.py", line 1650, in run
    super(MultipleSitesBot, self).run()
  File "F:\MABot\pywikibot\bot.py", line 1464, in run
    self.treat(page)
  File "F:\MABot\pywikibot\bot.py", line 1678, in treat
    self.treat_page()
  File ".\scripts\delete.py", line 214, in treat_page
    quit=True)
  File "F:\MABot\pywikibot\tools\__init__.py", line 1458, in wrapper
    return obj(*__args, **__kw)
  File "F:\MABot\pywikibot\page.py", line 1871, in delete
    return self.site.deletepage(self, reason)
  File "F:\MABot\pywikibot\site.py", line 1331, in callee
    self.login(True)
  File "F:\MABot\pywikibot\site.py", line 2080, in login
    raise NoUsername('No sysop is permitted with OAuth')
pywikibot.exceptions.NoUsername: No sysop is permitted with OAuth
<class 'pywikibot.exceptions.NoUsername'>
CRITICAL: Closing network session.

Closed as a duplicate, @MarcoAurelio please fill in important information to that task

Dvorapa removed a subscriber: Dvorapa.Jun 25 2017, 2:36 PM