C:\pwb\GIT\core>pwb.py clean_sandbox -lang:als Preparing to process sandbox page [[Wikipedia:Sandchaschte]] Traceback (most recent call last): File "C:\pwb\GIT\core\pwb.py", line 239, in <module> if not main(): File "C:\pwb\GIT\core\pwb.py", line 233, in main run_python_file(filename, argv, argvu, file_package) File "C:\pwb\GIT\core\pwb.py", line 88, in run_python_file main_mod.__dict__) File ".\scripts\clean_sandbox.py", line 294, in <module> main() File ".\scripts\clean_sandbox.py", line 291, in main bot.run() File ".\scripts\clean_sandbox.py", line 204, in run subst = 'subst:' in translatedContent TypeError: argument of type 'NoneType' is not iterable
Description
Description
Related Objects
Related Objects
Event Timeline
Comment Actions
Okay I'd suggest to merge a modified version back in. The modified version first checks site's lang and if there is no such translation it uses site's code (and it should issue a deprecation warning).
Comment Actions
Please don't. translate() is for L10N and shouldn't have fallback. twtranslate is for i18n and has fallback at least to 'en' which always work.
Comment Actions
If you look in https://gerrit.wikimedia.org/r/#/c/213794/1 I actually didn't touch translate.