Traceback (most recent call last):
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 399, in
<module>
if not main():
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 391, in main
run_python_file(filename,
File "/data/data/com.termux/files/home/vikaspy/pwb.py", line 106, in
run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File "./scripts/replace.py", line 1075, in <module>
main()
File "./scripts/replace.py", line 929, in main
single_summary = i18n.twtranslate(
File
"/data/data/com.termux/files/home/vikaspy/pywikibot/tools/_deprecate.py",
line 404, in wrapper
return obj(*__args, **__kw)
File "/data/data/com.termux/files/home/vikaspy/pywikibot/i18n.py", line
700, in twtranslate
raise pywikibot.exceptions.TranslationError(
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
https://www.mediawiki.org/wiki/Manual:Pywikibot/i18n
CRITICAL: Exiting due to uncaught exception <class
'pywikibot.exceptions.TranslationError'>
$
Hi all,
I'm building a small pywikibot tool[1] 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).
Cheers,
André / Lokal_Profil
[1] https://github.com/lokal-profil/pywikibot-sdc
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 ;)
Forwarding here on this list in case folks here are interested in attending
an upcoming workshop on Pywikibot framework..
*Srishti Sethi*
Senior Developer Advocate
Wikimedia Foundation <https://wikimediafoundation.org/>
---------- Forwarded message ---------
From: Srishti Sethi <ssethi(a)wikimedia.org>
Date: Wed, Mar 23, 2022 at 2:45 PM
Subject: Second Pywikibot workshop on Friday, March 25th, 16:00 UTC
To: Wikimedia developers <wikitech-l(a)lists.wikimedia.org>, Wikimedia
Mailing List <wikimedia-l(a)lists.wikimedia.org>, <
wikidata(a)lists.wikimedia.org>, <cloud(a)lists.wikimedia.org>
Cc: Seyram Komla Sapaty <ssapaty(a)wikimedia.org>
Hello everyone,
The second workshop on the topic of "Running Pywikibot scripts" is coming
up - it will take place on Friday, March 25th at 16:00 UTC. You can find
more details on the workshop and a link to join here: <
https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Workshops#How_to_run_a_…>
[1].
This workshop will introduce participants to the bot scripts available via
the Pywikibot framework and how to use them. If you missed attending the
first one, it would be beneficial to have Pywikibot installed on your
computer before the workshop.
We look forward to your participation!
Best,
Srishti
On behalf of the SWT Workshops Organization team
[1]
https://meta.wikimedia.org/wiki/Small_wiki_toolkits/Workshops#How_to_run_a_…
*Srishti Sethi*
Senior Developer Advocate
Wikimedia Foundation <https://wikimediafoundation.org/>
Hello,
This is an announcement for a significant, but not breaking, change to the
response format of the wbsearchentities API. So far, each search result has
included "label" or "description" members- which included the
label/description of the matched entity- so that it could be shown to
users. However, these were plain strings with no indication of the language
of the label or description: if language fallback happened (e.g. if the
search was in Arabic, but the item only had an English description), then
there would be no indication of this in the response. Users of the API
couldn’t know what the language of the returned label/description was
without a separate API call to retrieve the entity’s data. This is for
example necessary for screen readers to read out the label/description in
the correct language. (We will follow up with other changes to make use of
it in the Wikibase UI, so that screen readers there are getting a better
indication of which language to read out.)
We have resolved this with the addition of a new "display" member to the
search result structure, which contains a "label" and "description" that
are not plain strings, but rather objects with "language" and "value"
members (like labels and descriptions in the normal JSON serialization
<https://doc.wikimedia.org/Wikibase/master/php/md_docs_topics_json.html#json…>).
The old "label" and "description" fields are still there, but deprecated:
we recommend that you don’t use them in new code. Please note that, just
like the "label" and "description" were always optional (i.e. could be
missing for entities that had no label or description available in the
request language or a fallback language), so the "label" and "description"
in the new response are also optional (under the same conditions).
This change was already deployed to Beta Wikidata, Test Wikidata, and
Wikidata. If you have any questions or feedback, please feel free to let us
know in this ticket <https://phabricator.wikimedia.org/T104344>.
Cheers,
--
Mohammed Sadat
*Community Communications Manager for Wikidata/Wikibase*
Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin
Phone: +49 (0)30 219 158 26-0
https://wikimedia.de
Keep up to date! Current news and exciting stories about Wikimedia,
Wikipedia and Free Knowledge in our newsletter (in German): Subscribe now
<https://www.wikimedia.de/newsletter/>.
Imagine a world in which every single human being can freely share in the
sum of all knowledge. Help us to achieve our vision!
https://spenden.wikimedia.de
Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V.
Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter
der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für
Körperschaften I Berlin, Steuernummer 27/029/42207.
-------- Forwarded Message --------
Subject: stream.wikimedia.org - stream retention change
Date: Mon, 21 Mar 2022 09:00:59 -0400
From: Andrew Otto <otto(a)wikimedia.org>
Hello!
*
*
tl;dr: all publicly available event streams at stream.wikimedia.org
<http://stream.wikimedia.org> will have their retention time set to 7 days.
*
*
Many of the streams available at stream.wikimedia.org
<http://stream.wikimedia.org/>have retention times of 31 days. This
means that at any given time, the past 31 days of these streams are
consumable.
*
*
Sometimes, within these streams, certain data may accidentally contain
personally identifiable information. For example, someone might
accidentally enter their personal email into a revision comment field.
On the wikis, this information can be quickly suppressed so that it is
not viewable externally. However, because streams are historical and
immutable, it is difficult to remove this information from the stream
history.
*
*
To help mitigate the risk of PII exposure, we are reducing the retention
of these streams to 7 days. We plan to make this change on *Monday April
4th 2022*.
**
In the future, we would like to intentionally remove this data from
streams. Doing so requires us to maintain new services that produce new
streams with PII information redacted. Doing this is not a trivial thing
to stand up, hence this mitigation effort for now.
-Andrew Otto
Wikimedia Foundation
Hello everyone,
Please I get this error while running scripts
*WARNING: API error modification-failed: ⧼wikibase-validator-bad-prefix⧽*
Please what is the cause of this? and what is the possible fix for it?
Thank you in anticipation.
Chima