Steps to Reproduce:
Run touch.py with default parameters using the following command:
python pwb.py touch.py -lang:ar -cat:"تحويلات متصلة بعنصر ويكي بيانات"
(In this case, it will run on this category: ar:تصنيف:تحويلات متصلة بعنصر ويكي بيانات)
Actual Results:
The script crashes with the following traceback:
python pwb.py touch.py -lang:ar -cat:"تحويلات متصلة بعنصر ويكي بيانات" Retrieving 50 pages from wikipedia:ar. 0 pages read 0 pages written Execution time: 11 seconds Script terminated by exception: ERROR: TranslationError: No English translation has been defined for TranslateWiki key "pywikibot-touch". It can happen due to lack of i18n submodule or files or an outdated submodule. See https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n Traceback (most recent call last): File "pwb.py", line 250, in <module> if not main(): File "pwb.py", line 243, in main run_python_file(filename, [filename] + args, argvu, file_package) File "pwb.py", line 95, in run_python_file main_mod.__dict__) File "./scripts/touch.py", line 135, in <module> main() File "./scripts/touch.py", line 127, in main bot.run() File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 1702, in run super(MultipleSitesBot, self).run() File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/bot.py", line 1505, in run self.treat(page) File "./scripts/touch.py", line 60, in treat page.touch(botflag=self.getOption('botflag')) File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/page.py", line 1425, in touch summary = i18n.twtranslate(self.site, 'pywikibot-touch') File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/tools/__init__.py", line 1738, in wrapper return obj(*__args, **__kw) File "/mnt/nfs/labstore-secondary-tools-home/meno25/core/pywikibot/i18n.py", line 756, in twtranslate twtitle, __url__))) pywikibot.i18n.TranslationError: No English translation has been defined for TranslateWiki key "pywikibot-touch". It can happen due to lack of i18n submodule or files or an outdated submodule. See https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n CRITICAL: Exiting due to uncaught exception <class 'pywikibot.i18n.TranslationError'>
Notes
Running the with the following command works as expected:
python pwb.py touch.py -purge -lang:ar -cat:"تحويلات متصلة بعنصر ويكي بيانات"
So, the issue is only when running the script without the
-purge
Expected Results:
- The script should not crash when run with default parameters.
- If the intention of the developers is to force the users to always use -purge, then in this case the script should give a Too few input arguments error or something like that, but I don't believe that crashing the script is the correct behavior here. Thank you.