fnegri created this task. fnegri added projects: Toolforge, Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. Restricted Application added a project: cloud-services-team.
TASK DESCRIPTION The Toolforge pywikibot image adds a user-config.py <https://gitlab.wikimedia.org/toolforge-repos/pywikibot-buildservice/-/blob/toolforge/user-config.py?ref_type=heads> file that reads values from five `PWB_*` env vars. The docs <https://wikitech.wikimedia.org/wiki/Help:Toolforge/Running_Pywikibot_scripts> clearly specify that you should set those variables. However, if by any chance you try running the Toolforge pywikibot image and one or more variables are missing, you get a very obscure error message: tools.pywikibot@tools-bastion-15:~$ toolforge jobs run --image tool-pywikibot/pywikibot-scripts-stable:latest --command "pwb -version" test-pwb-version tools.pywikibot@tools-bastion-15:~$ toolforge jobs logs test-pwb-version 2026-01-28T15:28:14Z [test-pwb-version-s94pj] [job] CRITICAL: Exiting due to uncaught exception FatalServerError: Only unicode objects are escapable. Got None of type <class 'NoneType'>. 2026-01-28T15:28:14Z [test-pwb-version-s94pj] [job] File "/workspace/pywikibot/comms/http.py", line 340, in error_handling_callback 2026-01-28T15:28:14Z [test-pwb-version-s94pj] [job] pywikibot.info('Pywikibot: ' + getversion()) It would be nicer if you got a warning like: "ERROR: Required env variables are not set". TASK DETAIL https://phabricator.wikimedia.org/T415818 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
