Page MenuHomePhabricator

pwb.py won't run userscripts
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Create a script in scripts/userscripts
  2. Try to run it using pwb.py: python pwb.py my_script

Expected behavior
Until recently it was possible to run python pwb.py my_script if there was a my_script.py file in scripts/userscripts.

Current behavior
This is not possible now, running python pwb.py my_script speaks about misspelling. python pwb.py userscripts/my_script works, but it is a breaking change for my cron jobs. As it is a breaking change and there is no information in changelog / HISTORY.rst about it, so it might be a bug?

Configuration
Pywikibot master, Python 3.7.3+, Toolforge

Event Timeline

Xqt changed the task status from Open to In Progress.Nov 6 2022, 7:36 AM
Xqt claimed this task.
Xqt triaged this task as High priority.

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

[pywikibot/core@master] [BUGFIX] re-enable running scripts in userscripts folder via pwb wrapper

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

Change 853493 merged by jenkins-bot:

[pywikibot/core@master] [BUGFIX] re-enable running scripts in userscripts folder via pwb wrapper

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