Page MenuHomePhabricator

Sysop not authorized to (un)delete pages on wikipedia
Open, NormalPublic

Description

I have sysop rights, in user-config.py line

sysopnames['wikipedia']['cs'] = u'JAn Dudík'

but when I want to mass delete using script, I am not able to login as sysop only as bot without sysop rights:

C:\pwb>pwb.py delete -file:aaa.txt
Enter a reason for the deletion: Nahrazeno šloblonou {{Části české obce}}


>>> Šablona:Město Kožlany <<<
WARNING: There are 1 pages who link to [[cs:Šablona:Město Kožlany]].
    Project:    [4]          1 page
Do you want to delete [[cs:Šablona:Město Kožlany]]? ([y]es, [N]o, [a]ll, [q]uit): y
Password for user JAn Dudík on wikipedia:cs (no characters will be shown):
Logging in to wikipedia:cs as JAn Dudík
WARNING: API warning (login): Main-account login via action=login is deprecated and may stop working without warning. To continue login with action=login, see [[Special:BotPasswords]]. To safely continue using main-account login, see action=clientlogin.
ERROR: Logged in as 'JAn Dudík' instead of 'JAnDbot'. Forcing re-login.
Logging in to wikipedia:cs as JAnDbot
WARNING: API warning (login): Main-account login via action=login is deprecated and may stop working without warning. To continue login with action=login, see [[Special:BotPasswords]]. To safely continue using main-account login, see action=clientlogin.
ERROR: Logged in as 'JAnDbot' instead of 'JAn Dudík'. Forcing re-login.
Logging in to wikipedia:cs as JAnDbot
WARNING: API warning (login): Main-account login via action=login is deprecated and may stop working without warning. To continue login with action=login, see [[Special:BotPasswords]]. To safely continue using main-account login, see action=clientlogin.
WARNING: API error permissiondenied: Permission denied

0 pages read
0 pages written
Execution time: 23 seconds
Script terminated by exception:

ERROR: Error: User JAnDbot not authorized to (un)delete pages on wikipedia:cs wiki.
Traceback (most recent call last):
  File "C:\pwb\pwb.py", line 255, in <module>
    if not main():
  File "C:\pwb\pwb.py", line 249, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "C:\pwb\pwb.py", line 121, in run_python_file
    main_mod.__dict__)
  File ".\scripts\delete.py", line 304, in <module>
    main()
  File ".\scripts\delete.py", line 296, in main
    bot.run()
  File "C:\pwb\pywikibot\bot.py", line 1621, in run
    super(MultipleSitesBot, self).run()
  File "C:\pwb\pywikibot\bot.py", line 1435, in run
    self.treat(page)
  File "C:\pwb\pywikibot\bot.py", line 1649, in treat
    self.treat_page()
  File ".\scripts\delete.py", line 214, in treat_page
    quit=True)
  File "C:\pwb\pywikibot\tools\__init__.py", line 1447, in wrapper
    return obj(*__args, **__kw)
  File "C:\pwb\pywikibot\page.py", line 1824, in delete
    return self.site.deletepage(self, reason)
  File "C:\pwb\pywikibot\site.py", line 1330, in callee
    return fn(self, *args, **kwargs)
  File "C:\pwb\pywikibot\tools\__init__.py", line 1447, in wrapper
    return obj(*__args, **__kw)
  File "C:\pwb\pywikibot\site.py", line 5383, in deletepage
    raise Error(self._dl_errors[err.code] % errdata)
pywikibot.exceptions.Error: User JAnDbot not authorized to (un)delete pages on wikipedia:cs wiki.
<class 'pywikibot.exceptions.Error'>
CRITICAL: Closing network session.

Event Timeline

JAnD created this task.Dec 5 2016, 7:34 AM
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptDec 5 2016, 7:34 AM

Change 341699 had a related patch set uploaded (by Xqt; owner: Masti):
[pywikibot/core] fix relogin issue with admin account

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

Xqt triaged this task as Normal priority.Jun 27 2017, 5:32 PM
Xqt added a project: Pywikibot.
Mahveotm moved this task from Backlog to Needs Review on the Pywikibot board.Jan 22 2019, 10:06 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptSat, Sep 28, 8:09 PM