Multichill created this task. Multichill added projects: Pywikibot, Pywikibot-i18n, Regression. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.
TASK DESCRIPTION I use pwb.py as wrapper to run scripts. If I do an imagefile.touch() . Since recently this throws a : File "/home/me/pywikibot/pywikibot/page/__init__.py", line 1459, in touch summary = i18n.twtranslate(self.site, 'pywikibot-touch') File "/home/me/pywikibot/pywikibot/tools/__init__.py", line 1790, in wrapper return obj(*__args, **__kw) File "/home/me/pywikibot/pywikibot/i18n.py", line 721, in twtranslate % (_messages_package_name, twtitle, __url__)) pywikibot.i18n.TranslationError: Unable to load messages package scripts.i18n for bundle pywikibot-touch It can happen due to lack of i18n submodule or files. See https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n CRITICAL: Exiting due to uncaught exception <class 'pywikibot.i18n.TranslationError'> This used to work until quite recently. Just python directly is no problem >>> import pywikibot >>> site = pywikibot.Site('commons', 'commons') >>> imagefile = pywikibot.FilePage(site, title='File:Jan_Steen_-_The_Drawing_Lesson_-_83.PB.388_-_J._Paul_Getty_Museum.jpg') >>> imagefile.touch() Page [[commons:File:Jan Steen - The Drawing Lesson - 83.PB.388 - J. Paul Getty Museum.jpg]] saved >>> If I throw these 4 lines in a file and run it: $ python3 pwb.py ~/temp/touch_i18n.problem.py I get the exception. Using the latest git version of pywikibot and the i18n part: Pywikibot: [ssh] pywikibot-core.git (0a544a2 <https://phabricator.wikimedia.org/rPWBC0a544a2f3acbbf755ca81fd84acba7d7907b7179>, g12235, 2020/04/04, 15:23:52, ok) Probably recenlty the logic of pwb.py got altered a bit? TASK DETAIL https://phabricator.wikimedia.org/T249427 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Multichill Cc: Aklapper, pywikibot-bugs-list, Dvorapa, Xqt, Multichill, Zkhalido, Viztor, Wenyi, Jayprakash12345, Tbscho, MayS, Mdupont, JJMC89, Altostratus, Avicennasis, Wong128hk, mys_721tx, jayvdb, Masti, Alchimista, Rxy
_______________________________________________ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs