Traceback (most recent call last):
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 399, in
if not main():
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 391, in main
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 106, in
exec(compile(source, filename, 'exec', dont_inherit=True),
File "./scripts/replace.py", line 1075, in <module>
File "./scripts/replace.py", line 929, in main
single_summary = i18n.twtranslate(
line 404, in wrapper
return obj(*__args, **__kw)
File "/data/data/com.termux/files/home/vikaspy/pywikibot/i18n.py", line
700, in twtranslate
pywikibot.exceptions.TranslationError: Unable to load messages package
scripts.i18n for bundle replace-replacing
It can happen due to lack of i18n submodule or files. See
CRITICAL: Exiting due to uncaught exception <class
I'm building a small pywikibot tool which is designed to be installed
via pip (and in turn installs Pywikibot via pip).
The tool uses the page.touch() function which is where I get a
pywikibot.i18n.TranslationError when I run it.
page.touch() gets it's edit summary from i18n.twtranslate(self.site,
'pywikibot-touch') which in turn is defined in /scripts/i18n/pywikibot/.
Unless I'm confused the Error occurs because the pip distribution does not
include the /scripts folder or the i18n submodule.
So my first question is am I just doing something obviously wrong and the
i18n submodule should have been available over pip as well?
If it's not just me then would it not make sense to have any i18n files
necessary to the Pywikibot *library* to also be distributed via the same
pip package? (i18n for scripts is another issue since for scripts you
cannot use pip).
André / Lokal_Profil
André Costa | Chief Operating Officer, Wikimedia Sverige |
Andre.Costa(a)wikimedia.se | +46 (0)733-964574
Stöd fri kunskap, bli medlem i Wikimedia Sverige.
Läs mer på blimedlem.wikimedia.se
sent from my mobile, all typos are due to autocorrect ;)
I am trying to build a script to add a reference to a few hundred articles on pt.wikipedia. I would like to use the noreferences.py script that is part of core, to add a reference section in the same run, if it is not already present in the article.
I have tried to import the script, the NoReferencesBot class, but I must be doing something wrong. It says that the function hasn't been defined.
You can check what I have been trying to do here: https://public.paws.wmcloud.org/User:GoEThe/IUCN%20status.ipynb
Any help will be greatly appreciated!
Hi lovely pywikibot folks. I'd like to clean up our deprecated code
since we have some that's six years old....
% grep -RIoh "since='[^']\+'" ./* | sort | head -n 5
% grep -RIoh "since='[^']\+'" ./* | wc -l
What is pywikibot's policy regarding code deprecation? Can we remove
it after a set duration and, if so, what is it?