Steps to replicate the issue:
Run toolforge-jobs run purge --command "python3 $HOME/pywikibot-core/pwb.py touch.py -page:hu:Kezdőlap -purge" --image python3.9 on the bastion host.
(the same issue on local machine if run python pwb.py touch.py -page:hu:Kezdőlap -purge)
What happens?:
Received error message:
wrapping list type to a Generator type
WARNING: No user is logged in on site wikipedia:hu
Traceback (most recent call last):
File "/data/project/ato/pywikibot-core/pwb.py", line 39, in <module>
sys.exit(main())
File "/data/project/ato/pywikibot-core/pwb.py", line 35, in main
runpy.run_path(str(path), run_name='__main__')
File "/usr/lib/python3.9/runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "/usr/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/data/project/ato/pywikibot-core/pywikibot/scripts/wrapper.py", line 516, in <module>
main()
File "/data/project/ato/pywikibot-core/pywikibot/scripts/wrapper.py", line 500, in main
if not execute():
File "/data/project/ato/pywikibot-core/pywikibot/scripts/wrapper.py", line 487, in execute
run_python_file(filename, script_args, module)
File "/data/project/ato/pywikibot-core/pywikibot/scripts/wrapper.py", line 147, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File "/data/project/ato/pywikibot-core/scripts/touch.py", line 168, in <module>
main()
File "/data/project/ato/pywikibot-core/scripts/touch.py", line 164, in main
bot_class(generator=gen, **options).run()
File "/data/project/ato/pywikibot-core/pywikibot/bot.py", line 1715, in run
self.exit()
File "/data/project/ato/pywikibot-core/pywikibot/bot.py", line 1554, in exit
self.teardown()
File "/data/project/ato/pywikibot-core/scripts/touch.py", line 105, in teardown
self.purgepages(flush=True)
File "/data/project/ato/pywikibot-core/scripts/touch.py", line 120, in purgepages
done = site.purgepages(pagelist, **self.opt)
File "/data/project/ato/pywikibot-core/pywikibot/site/_decorators.py", line 89, in callee
raise UserRightsError('User "{}" does not have required '
pywikibot.exceptions.UserRightsError: User "None" does not have required user right "purge"
CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.UserRightsError'>What should have happened instead?:
Atobot's last run was succesfull on 2023.01.23 on the bastion host:
Retrieving 1 pages from wikipedia:hu. Sleeping for 9.5 seconds, 2023-01-21 23:01:15 Page [[hu:Kezdőlap]] purged 1 read operation 1 purge operation Execution time: 10 seconds Read operation time: 10.0 seconds Purge operation time: 10.0 seconds Script terminated successfully.
Software version :
Pywikibot: [https] r-pywikibot-core.git (a85ea67, g1, 2022/09/26, 14:17:39, stable)
Release version: 7.7.0
setuptools version: 40.8.0
mwparserfromhell version: 0.6.3
wikitextparser version: n/a
requests version: 2.21.0
cacerts: /etc/ssl/certs/ca-certificates.crt
certificate test: ok
Python: 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0]
PYWIKIBOT_DIR: Not set
PYWIKIBOT_DIR_PWB: /shared/pywikibot/stable
PYWIKIBOT_NO_USER_CONFIG: Not set
Config base dir: /data/project/ato/.pywikibot
Usernames for family 'wikipedia':
hu: atobot