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 ;)
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
since='20150206'
since='20150515'
since='20150615'
since='20150617'
since='20150619'
% grep -RIoh "since='[^']\+'" ./* | wc -l
130
What is pywikibot's policy regarding code deprecation? Can we remove
it after a set duration and, if so, what is it?
Thanks! -Damian
I want to import the module template from Wikipedia to my wiki
Please give me import bot Script, I know Special: export, Special: Import
can be done but I want to import with bot please help
Hi AntiCompositeNumber,
that did the job. I was not aware about
https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords and following
instructions given over there helped me log in.
Thank you
Pamputt
> ---------- Forwarded message ----------
> From: AntiCompositeNumber <anticompositenumber(a)gmail.com>
> To: Pywikibot discussion list <pywikibot(a)lists.wikimedia.org>
> Cc:
> Bcc:
> Date: Wed, 14 Jul 2021 13:09:47 -0400
> Subject: [pywikibot] Re: Log in to Lingua LIbre through Wikimedia Commons
> via OAuth
> pywikibot supports authentication using Extension:OAuth
> (authenticating directly to the wiki), but I don't think it supports
> Extesnion:OAuthAuthentication (authenticating to another wiki). It
> does appear that BotPasswords are enabled on Lingua Libre
> (https://lingualibre.org/wiki/Special:BotPasswords), so I'd suggest
> trying that. For more information see
> <https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords>.
>
>
Hello,
I try to add a support to Lingua Libre (https://lingualibre.org) in
Pywikibot but I cannot figure out how to connect to the website to be able
to edit (the current support of Lingua Libre in PWB allows to "read" Lingua
Libre, not to "edit").
The problem is the way to log in is quit unusual. Normal user who wants to
log in on Lingua Libre, has to log in on Wikimedia Commons via OAuth (you
can see cliking on
https://lingualibre.org/index.php?title=Special:UserLogin&returnto=LinguaLi…
)
And it makes me completely lost about the way to log in a bot with such
system.
Here is the ouput of python pwb.py login -v (I try to log in with my user
account to check)
with this content in user-config.py
family = 'lingualibre'
mylang = 'lingualibre'
usernames['lingualibre']['lingualibre'] = 'Pamputt'
Python 3.8.9 (default, Apr 5 2021, 18:09:13)
[GCC 10.2.1 20210130]
Found 1 lingualibre:lingualibre processes running, including this one.
WARNING: No user is logged in on site lingualibre:lingualibre
Password for user Pamputt on lingualibre:lingualibre (no characters
will be shown):
Logging in to lingualibre:lingualibre as Pamputt
WARNING: API warning (main): Unrecognized parameters: username, password.
ERROR: Login failed (FAIL).
Traceback (most recent call last):
File "/home/pamputt/bot/core/pywikibot/login.py", line 307, in login
self.login_to_site()
File "/home/pamputt/bot/core/pywikibot/data/api.py", line 2968, in
login_to_site
raise pywikibot.exceptions.APIError(code=status, info=fail_reason)
pywikibot.exceptions.APIError: FAIL: The supplied credentials could
not be authenticated.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "pwb.py", line 399, in <module>
if not main():
File "pwb.py", line 391, in main
run_python_file(filename,
File "pwb.py", line 106, in run_python_file
exec(compile(source, filename, 'exec', dont_inherit=True),
File "./scripts/login.py", line 151, in <module>
main()
File "./scripts/login.py", line 139, in main
site.login(autocreate=autocreate)
File "/home/pamputt/bot/core/pywikibot/site/_apisite.py", line 390, in login
if login_manager.login(retry=True, autocreate=autocreate):
File "/home/pamputt/bot/core/pywikibot/login.py", line 316, in login
raise NoUsernameError(error_msg)
pywikibot.exceptions.NoUsernameError: Username "Pamputt" does not have
read permissions on lingualibre:lingualibre
.The supplied credentials could not be authenticated.
You can also have a look at
https://lingualibre.org/api.php?action=query&meta=authmanagerinfo&amireques…
to see that direct authentication are forbidden ("canauthenticatenow": "")
So, is anyone know how to log in with such authentication system (I am
completely lost with OAuth).
Thanks in advance
Pamputt
Hi help please,
I can use all of the Mediawiki Python bot Script but I can't use any other
custom script.
https://github.com/fsondej/autocorrect
I want to use this script but can't, I'm use to termux
Hi all. I wrote monthly status reports for Tor and plan to do the same
for Wikipedia, so here's what I've been up to this month...
https://blog.atagar.com/june2021/
If any Seattlites on this list would care to snag a cup of coffee
please let me know!
Cheers! -Damian