[Pywikipedia-bugs] [Maniphest] [Closed] T350272: Invoking scripts with -help performs an unnecessary connection to the remote wiki
Ciencia_Al_Poder closed this task as "Resolved". Ciencia_Al_Poder added a comment. Thanks for the fix! I've tested it and it now works TASK DETAIL https://phabricator.wikimedia.org/T350272 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, Ciencia_Al_Poder Cc: Aklapper, Ciencia_Al_Poder, pywikibot-bugs-list, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Claimed] T261549: -redirectonly pagegenerators option wasn't ported from compat
Ciencia_Al_Poder claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T261549 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Mpaa, Strainu, Aklapper, Xqt, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, droid, Masti, Alchimista, Jay8g ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Edited] T350272: Invoking scripts with -help performs an unnecessary connection to the remote wiki
Ciencia_Al_Poder updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T350272 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, Ciencia_Al_Poder, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Created] T350272: Invoking scripts with -help performs an unnecessary connection to the remote wiki
Ciencia_Al_Poder created this task. Ciencia_Al_Poder added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue** 1. Configure a family that points to an invalid domain or a server that's down, and set it as the default family (in `user-config.py`) 2. Invoke a script with only the `-help` parameter. Example: python3 pwb.py scripts/delete.py -help **What happens?**: ERROR: An error occurred for uri https://test-1-23.localwiki.com/api.php?action=query=userinfo=blockinfo%7Cgroups%7Chasmsg%7Cratelimits%7Crights=2=5=json ERROR: Traceback (most recent call last): File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/data/api/_requests.py", line 682, in _http_request response = http.request(self.site, uri=uri, File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/comms/http.py", line 283, in request r = fetch(baseuri, headers=headers, **kwargs) ^ File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/comms/http.py", line 457, in fetch callback(response) File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/comms/http.py", line 343, in error_handling_callback raise response from None File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/comms/http.py", line 448, in fetch response = session.request(method, uri, File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^ File "/usr/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^ File "/usr/lib/python3.11/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='test-1-23.localwiki.com', port=443): Max retries exceeded with url: /api.php?action=query=userinfo=blockinfo%7Cgroups%7Chasmsg%7Cratelimits%7Crights=2=5=json (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] Connection refused')) **What should have happened instead?**: The help information of the script should be displayed, instead of an error because it failed to connect to a remote wiki. This wasn't happening a while ago. **Software version** current master commit 8040430ee980b354b12831488bc355c2cd59926f <https://phabricator.wikimedia.org/rPWBC8040430ee980b354b12831488bc355c2cd59926f> Date: Wed Nov 1 12:37:56 2023 + - Workaround ** Specify a working family file with a ' -family:` parameter or changing the default family TASK DETAIL https://phabricator.wikimedia.org/T350272 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, Ciencia_Al_Poder, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Updated] T219093: protect.py should provides option to choose level for protect
Ciencia_Al_Poder added a comment. I think this request is invalid because it already supports those parameters (they existed before the task was created, as they are mentioned in rPWBCac834c998a <https://phabricator.wikimedia.org/rPWBCac834c998a684db4c53c89ced8f322eeacca6867> from 2014) -unprotectActs like "default:all" -default: Sets the default protection level (default 'sysop'). If no level is defined it doesn't change unspecified levels. -[type]:[level] Set [type] protection level to [level] Usual values for [level] are: sysop, autoconfirmed, all; further levels may be provided by some wikis. For all protection types (edit, move, etc.) it chooses the default protection level. This is "sysop" or "all" if -unprotect was selected. If multiple parameters -unprotect or -default are used, only the last occurrence is applied. TASK DETAIL https://phabricator.wikimedia.org/T219093 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Ciencia_Al_Poder, Framawiki, Aklapper, Kizule, pywikibot-bugs-list, PotsdamLamb, Jyoo1011, JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, Xqt, jayvdb, Masti, Alchimista ___ pywikibot-bugs mailing list -- pywikibot-bugs@lists.wikimedia.org To unsubscribe send an email to pywikibot-bugs-le...@lists.wikimedia.org
[Pywikipedia-bugs] [Maniphest] [Commented On] T229293: invalid CSRF token error shown with each block
Ciencia_Al_Poder added a comment. I think the bot shouldn't check user rights neither. Do what the bot owner has instructed it to do, and if you can't by permissions, the api will return a relevant error. TASK DETAIL https://phabricator.wikimedia.org/T229293 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Huji, Ciencia_Al_Poder Cc: Ciencia_Al_Poder, JJMC89, Dvorapa, Dalba, Framawiki, Aklapper, Huji, pywikibot-bugs-list, Hook696, Daryl-TTMG, RomaAmorRoma, 0010318400, E.S.A-Sheild, joker88john, Viztor, DannyS712, CucyNoiD, NebulousIris, Wenyi, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Af420, Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Tbscho, MayS, WSH1906, Lewizho99, Mdupont, Maathavan, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista, Rxy ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Commented On] T122705: delete.py asks for password on *every* deletion
Ciencia_Al_Poder added a comment. In T122705#4850557, @Zoranzoki21 wrote: I can not reproduce this. Have you tried with an account that's not a sysop, but is on a group with the delete right (and can normally delete pages with the web interface)?TASK DETAILhttps://phabricator.wikimedia.org/T122705EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Ciencia_Al_PoderCc: Framawiki, zhuyifei1999, Zoranzoki21, Xqt, valhallasw, Mpaa, Magul, MarcoAurelio, Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list, Wenyi, Mahveotm, Tbscho, MayS, Mdupont, JJMC89, Avicennasis, mys_721tx, jayvdb, Dalba, Masti, Alchimista, Rxy___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T138690: Determine source of notifications API change
Ciencia_Al_Poder added a comment. @Catrope Is someone going to do the right thing and announce it, even if it's 3 months late? Better late than never ^^ The change has been done on an extension, though, not in core, so the MediaWiki version may be a bit fuzzy, although extensions are usually tagged with a MediaWiki release whenever a new MediaWiki release is created (well... almost... T66157)TASK DETAILhttps://phabricator.wikimedia.org/T138690EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: APerson, Ciencia_Al_PoderCc: Mpaa, Catrope, Ciencia_Al_Poder, Ricordisamoa, Aklapper, jayvdb, Zppix, pywikibot-bugs-list, APerson, Sethakill, dg711, SBisson, Luke081515, Anomie, Legoktm___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T138690: Determine source of notifications API change
Ciencia_Al_Poder added a comment. Looks like rECHOb10bd700333d2eef10c7df0a9946b87fd451f81bTASK DETAILhttps://phabricator.wikimedia.org/T138690EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: Ciencia_Al_PoderCc: Ciencia_Al_Poder, Ricordisamoa, Aklapper, jayvdb, Zppix, pywikibot-bugs-list, APerson, Sethakill, dg711, SBisson, Luke081515, Catrope, Anomie, Legoktm___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T132847: Allow any number of filters in addition to page generators
Ciencia_Al_Poder created this task. Herald added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION The current generator system is very limited when we need to use several conditions. You can get pages by category, linked from a given page, links to a given page, transcluded, etc, but it's difficult or impossible to combine such generators to filter a specific generator, and it's done in an inefficient way: It usually takes both generators, and once you get the list of pages of both, it processes the pages that are in both returned results. Example use case: - Get a list of images from a given category that are not in use (for example, to delete them) The current approach would be to use the category generator and also the unusedfiles generator, but the later can return a very long list, and even incomplete, on large wikis (because it has a limit), and that's not efficient. There should be a way to specify the generator, and also a way to specify a filtering generator. For example, in the situation from the example, I should be able to specify the categorymember generator (optionally with the namespace to get only pages in the file namespace) to get a list of images on that category, and then, when processing each page, check the usage of that particular image to see if it's in use (optionally, filtering in which namespaces to filter, that would be a plus!). Most of the current generators may be allowed to work as either generators or filters. In an ideal world, pywikibot could be smart enough to select the better combination itself. //In the previous example, select category as generator. and then filter by usage.// But that's probably very complicated to achieve, so I suggest using a prefix on current generators to tell pywikibot to use them as filters and not generators. That way it also gives users control to specify the main generator. For example: `-cat:"Some category" -ns:File -filter-unusedfiles` See also: - T99454: Generators should allow to filter for redirects (include only redirects, or exclude them) <https://phabricator.wikimedia.org/T99454> - T101698: category.py move ignores -namespace: generator <https://phabricator.wikimedia.org/T101698> - T114015: pagegenerators: titleregex should filter other generators <https://phabricator.wikimedia.org/T114015> TASK DETAIL https://phabricator.wikimedia.org/T132847 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, Ciencia_Al_Poder, pywikibot-bugs-list, Mdupont, jayvdb ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T122705: delete.py asks for password on *every* deletion
Ciencia_Al_Poder added a blocking task: T71283: dualism between user and sysop needs to be overtaken. TASK DETAIL https://phabricator.wikimedia.org/T122705 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list, Mdupont, jayvdb ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Updated] T122705: delete.py asks for password on *every* deletion
Ciencia_Al_Poder added a comment. I think this has to do with the fact that the user running the bot is not sysop, but it has delete permissions on the wiki, so the login prompt is unneeded. I have also this in user-config.py: usernames['wikidex']['es'] = u'PoryBot' sysopnames['wikidex']['es'] = u'PoryBot' Probably has to do with T71283: dualism between user and sysop needs to be overtaken <https://phabricator.wikimedia.org/T71283> TASK DETAIL https://phabricator.wikimedia.org/T122705 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Closed] T122681: pywikibot.i18n.TranslationError: No English translation has been defined for TranslateWiki key u'delete-from-category'
Ciencia_Al_Poder closed this task as "Invalid". Ciencia_Al_Poder claimed this task. Ciencia_Al_Poder added a comment. Resolved, apparently I had to download i18n again... I wasn't expecting it to be a submodule TASK DETAIL https://phabricator.wikimedia.org/T122681 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Edited] T122705: delete.py asks for password on *every* deletion
Ciencia_Al_Poder edited the task description. Ciencia_Al_Poder set Security to None. TASK DETAIL https://phabricator.wikimedia.org/T122705 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T122705: delete.py asks for password on *every* deletion
Ciencia_Al_Poder created this task. Ciencia_Al_Poder added a subscriber: Ciencia_Al_Poder. Ciencia_Al_Poder added a project: pywikibot-core. Herald added subscribers: pywikibot-bugs-list, StudiesWorld, Aklapper. TASK DESCRIPTION delete.py keeps asking for the bot's password on every edit: ``` jesus@charmander:~/git/mediawiki/pywikibot/core> python pwb.py scripts/delete.py -family:wikidex -cat:"Sprites de MTs" -titleregex:"MT[0-9][0-9].png" -summary:"Se deben usar los sprites de MT por tipo, no nĂºmero" -v -debug WARNING: /home/jesus/git/mediawiki/pywikibot/core/pywikibot/version.py:100: DeprecationWarning: pywikibot.version.getversion_svn is deprecated; use getversion_svn_setuptools instead. (tag, rev, date, hsh) = vcs_func(_program_dir) WARNING: /home/jesus/git/mediawiki/pywikibot/core/pywikibot/version.py:248: DeprecationWarning: pywikibot.version.svn_rev_info is deprecated; use getversion_svn_setuptools instead. tag, rev, date = svn_rev_info(_program_dir) Pywikibot r343f1bbfdabbbc182e97bea31b2c5d8c6af44b79 Python 2.7.8 (default, Sep 30 2014, 15:34:38) [GCC] Found 1 wikidex:es processes running, including this one. Working on u'Archivo:MT48.png' >>> Archivo:MT48.png <<< Do you want to delete [[es:Archivo:MT48.png]]? ([y]es, [N]o, [a]ll): y Password for user PoryBot on wikidex:es (no characters will be shown): Logging in to wikidex:es as PoryBot Should be logged in now WARNING: /home/jesus/git/mediawiki/pywikibot/core/pywikibot/data/api.py:2348: DeprecationWarning: Instead of using kwargs from Request.__init__, parameters for the request to the API should be added via the "parameters" parameter. kwargs = self.request_class.clean_kwargs(kwargs) WARNING: /home/jesus/git/mediawiki/pywikibot/core/pywikibot/tools/ip.py:78: DeprecationWarning: ipaddress backport not available. WARNING: /home/jesus/git/mediawiki/pywikibot/core/pywikibot/tools/ip.py:79: DeprecationWarning: page.ip_regexp is deprecated; use tools.ip.is_IP instead. if ip_regexp.match(IP) is None: Working on u'Archivo:MT49.png' >>> Archivo:MT49.png <<< Do you want to delete [[es:Archivo:MT49.png]]? ([y]es, [N]o, [a]ll): y Password for user PoryBot on wikidex:es (no characters will be shown): User quit DeletionRobot bot run... 1 pages read 0 pages written Execution time: 19 seconds Read operation time: 19 seconds Script terminated by exception: ERROR: QuitKeyboardInterrupt: Dropped throttle(s). Closing network session. Network session closed. ``` I even tried to just hit "enter" without filling the password, and the bot deleted the page without problems! so it's obviously logged in. I started doing so for a while, but after 5 logins or so the account was throttled and I'm now unable to make further edits. Great. I haven't updated pywikibot for months, since it was working as I needed, but then I needed to use -cat along with -titleregex, which was added in october, so I updated it to master. I'm not sure if the problem is only with delete.py, all scripts are broken, or is a problem with my configuration, which I don't discard because I had a hard time installing the "requests" python module that either wasn't required before or I had an older version that already worked TASK DETAIL https://phabricator.wikimedia.org/T122705 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list, jayvdb ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
[Pywikipedia-bugs] [Maniphest] [Created] T122681: pywikibot.i18n.TranslationError: No English translation has been defined for TranslateWiki key u'delete-from-category'
Ciencia_Al_Poder created this task. Ciencia_Al_Poder added a subscriber: Ciencia_Al_Poder. Ciencia_Al_Poder added a project: pywikibot-core. Herald added subscribers: pywikibot-bugs-list, StudiesWorld, Aklapper. TASK DESCRIPTION Running this command: `python pwb.py scripts/delete.py -family:[redacted] -cat:"Sprites de MTs" -titleregex:"MT[0-9][0-9].png" -summary:[redacted] -simulate` I get this error: ``` Traceback (most recent call last): File "pwb.py", line 248, in if not main(): File "pwb.py", line 242, in main run_python_file(filename, [filename] + args, argvu, file_package) File "pwb.py", line 120, in run_python_file main_mod.__dict__) File "./scripts/delete.py", line 168, in main() File "./scripts/delete.py", line 139, in main {'page': pageName}) File "/home/jesus/git/mediawiki/pywikibot/core/pywikibot/i18n.py", line 627, in twtranslate twtitle)) pywikibot.i18n.TranslationError: No English translation has been defined for TranslateWiki key u'delete-from-category' It can happen due to lack of i18n submodule or files. Read https://mediawiki.org/wiki/PWB/i18n CRITICAL: Closing network session. ``` I'm in current master (rPWBCb4f3c0fd7713c7368d5fb019efa1867a82e5e9fb) TASK DETAIL https://phabricator.wikimedia.org/T122681 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ciencia_Al_Poder Cc: Aklapper, StudiesWorld, Ciencia_Al_Poder, pywikibot-bugs-list, jayvdb ___ pywikibot-bugs mailing list pywikibot-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs