[Pywikipedia-bugs] [Maniphest] [Updated] T364689: In pywikibot, replace.py script using -regex can't handle null replacements

2024-05-12 Thread matej_suchanek
matej_suchanek edited projects, added Pywikibot-replace.py; removed Pywikibot-Scripts. matej_suchanek changed the subtype of this task from "Task" to "Bug Report". TASK DETAIL https://phabricator.wikimedia.org/T364689 EMAIL PREFERENCES https://phabricator.wikimedi

[Pywikipedia-bugs] [Maniphest] [Commented On] T364393: pywikibot does not handle properly 502 Server Error reading pages

2024-05-08 Thread matej_suchanek
matej_suchanek added a comment. I have been running into these lately, too. Especially when calling `DataSite.loadrevisions`. TASK DETAIL https://phabricator.wikimedia.org/T364393 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc

[Pywikipedia-bugs] [Maniphest] [Updated] T363303: page.coordinates() fails in pywikibot

2024-04-25 Thread matej_suchanek
matej_suchanek added a comment. Looks like there is still that one problem with credentials when running in PAWS: - T136114: PAWS can not login, OAuth error: API error mwoauth-invalid-authorization <https://phabricator.wikimedia.org/T136114> - T149672: OAuth: don't

[Pywikipedia-bugs] [Maniphest] [Commented On] T363303: page.coordinates() fails in pywikibot

2024-04-24 Thread matej_suchanek
matej_suchanek added a comment. That explains the "user that does not exist here". The bot is not registered on test.wikipedia <https://meta.wikimedia.org/wiki/Special:CentralAuth?target=Herzi+Bot+Pinki>. If you log in to the bot account and visit a page on test.wikipedia

[Pywikipedia-bugs] [Maniphest] [Updated] T363303: page.coordinates() fails in pywikibot

2024-04-24 Thread matej_suchanek
matej_suchanek removed a project: API Platform. matej_suchanek added a comment. Your script is apparently making a request to test.wikipedia.org and fails, claiming you don't have an account there. It's not clear to me why. Assuming you are using Herzi Pinki <https://meta.wikimedia.

[Pywikipedia-bugs] [Maniphest] [Closed] T363047: Replacement is reapplied when more context is requested

2024-04-21 Thread matej_suchanek
matej_suchanek closed this task as "Resolved". matej_suchanek assigned this task to Xqt. matej_suchanek removed a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T363047 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences

[Pywikipedia-bugs] [Maniphest] [Started] T142324: Apparently "text-contains" exceptions in user-fixes.py are ignored

2024-04-21 Thread matej_suchanek
matej_suchanek removed projects: TestMe, Patch-Needs-Improvement. matej_suchanek claimed this task. matej_suchanek changed the task status from "Open" to "In Progress". matej_suchanek changed the subtype of this task from "Task" to "Bug Report". TASK DE

[Pywikipedia-bugs] [Maniphest] [Commented On] T363047: Replacement is reapplied when more context is requested

2024-04-20 Thread matej_suchanek
matej_suchanek added a comment. Not really. You can easily make a recursive rule without regex, like "a" -> "aa". TASK DETAIL https://phabricator.wikimedia.org/T363047 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To:

[Pywikipedia-bugs] [Maniphest] [Triaged] T363047: Replacement is reapplied when more context is requested

2024-04-20 Thread matej_suchanek
matej_suchanek triaged this task as "High" priority. matej_suchanek added projects: Pywikibot-replace.py, Regression. TASK DETAIL https://phabricator.wikimedia.org/T363047 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc

[Pywikipedia-bugs] [Maniphest] [Created] T363047: Replacement is reapplied when more context is requested

2024-04-20 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION **Steps to replicate the issue** (include links if applicable): - Run `pwb.py replace "^" "a"

[Pywikipedia-bugs] [Maniphest] [Updated] T19154: Rollback does not restore linking tables (categorylinks, pagelinks)

2024-03-29 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T19154 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: XZise, pywikibot-bugs-list, jayvdb, Zppix, JoKent, Aklapper, aaron, Mr.Z-man, MZMcBride

[Pywikipedia-bugs] [Maniphest] [Changed Project Column] T325860: Unable to submit any pywikibot.WbTime with hour/minute/second even if precision is day or lower

2024-02-16 Thread matej_suchanek
matej_suchanek moved this task from Backlog to Upstream on the Pywikibot-Wikidata board. matej_suchanek added a project: Upstream. TASK DETAIL https://phabricator.wikimedia.org/T325860 WORKBOARD https://phabricator.wikimedia.org/project/board/110/ EMAIL PREFERENCES https

[Pywikipedia-bugs] [Maniphest] [Updated] T357540: pywikibot cannot save too precise WbTime claims

2024-02-16 Thread matej_suchanek
matej_suchanek added a project: Pywikibot-Wikidata. matej_suchanek added a comment. 3 is a big no-no because the behavior wouldn't match the user's expectations. 1 and 2 are ultimately the same (there would be an exception anyway). So this is just about showing a more user-friendly error

[Pywikipedia-bugs] [Maniphest] [Updated] T168508: revertbot.py doesn't respect put_throttle parameter in user-config.py

2024-02-05 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T168508 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Xqt, Aklapper, pywikibot-bugs-list, Dvorapa, mevo, PotsdamLamb, Jyoo1011, JohnsonLee01

[Pywikipedia-bugs] [Maniphest] [Updated] T338045: harvest_template.py adds duplicate claim if duplicate templates on same page

2024-02-05 Thread matej_suchanek
matej_suchanek added a project: Pywikibot-Wikidata. TASK DETAIL https://phabricator.wikimedia.org/T338045 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list, Framawiki, mevo, PotsdamLamb, Jyoo1011

[Pywikipedia-bugs] [Maniphest] [Retitled] T340632: Use pairwise to simplify code

2024-02-05 Thread matej_suchanek
matej_suchanek renamed this task from "Use pairsfile to simplify code" to "Use pairwise to simplify code". TASK DETAIL https://phabricator.wikimedia.org/T340632 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc:

[Pywikipedia-bugs] [Maniphest] [Commented On] T355981: Pywikibot makes extra network request even if diff is empty

2024-01-28 Thread matej_suchanek
matej_suchanek added a comment. What is the motivation behind the procedure? item = pywikibot.ItemPage(site, "Q1") item.editEntity() TASK DETAIL https://phabricator.wikimedia.org/T355981 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailp

[Pywikipedia-bugs] [Maniphest] [Triaged] T355927: Experimental build fails on NoUsernameError

2024-01-26 Thread matej_suchanek
matej_suchanek triaged this task as "High" priority. matej_suchanek added projects: Pywikibot, Pywikibot-tests. Restricted Application added a subscriber: pywikibot-bugs-list. TASK DETAIL https://phabricator.wikimedia.org/T355927 EMAIL PREFERENCES https://phabricator.wikimedia.or

[Pywikipedia-bugs] [Maniphest] [Commented On] T343187: Problems with logging in

2024-01-25 Thread matej_suchanek
matej_suchanek added a comment. I was suspicious there could be a race condition since my bot uses the asynchronous saving feature. So, I forced it to save synchronously. When I have it log out before running the script, I get messages like Change summary: add missing labels

[Pywikipedia-bugs] [Maniphest] [Commented On] T343187: Problems with logging in

2023-12-18 Thread matej_suchanek
matej_suchanek added a comment. Found a new exception in the logs: WARNING: /usr/lib/python3.9/http/cookiejar.py:1971: UserWarning: http.cookiejar bug! Traceback (most recent call last): File "/usr/lib/python3.9/http/cookiejar.py", line 1953, in _really_load

[Pywikipedia-bugs] [Maniphest] [Unassigned] T340632: Use pairsfile to simplify code

2023-10-09 Thread matej_suchanek
matej_suchanek removed matej_suchanek as the assignee of this task. TASK DETAIL https://phabricator.wikimedia.org/T340632 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list, matej_suchanek, Xqt

[Pywikipedia-bugs] [Maniphest] [Commented On] T343187: Problems with logging in

2023-10-07 Thread matej_suchanek
matej_suchanek added a comment. The problem persists. It always makes the same script fail when it starts. The script updates Wikidata labels. Other Wikidata scripts which edit data do not fail. TASK DETAIL https://phabricator.wikimedia.org/T343187 EMAIL PREFERENCES https

[Pywikipedia-bugs] [Maniphest] [Retitled] T345324: Asterisk account setting is not fully supported

2023-09-20 Thread matej_suchanek
matej_suchanek renamed this task from "Asteriks account setting ist not fully supported" to "Asterisk account setting is not fully supported". TASK DETAIL https://phabricator.wikimedia.org/T345324 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/pa

[Pywikipedia-bugs] [Maniphest] [Commented On] T326762: Support Wikimedia Commons Query Service

2023-08-20 Thread matej_suchanek
matej_suchanek added a comment. Works for me, provided the bot account has authenticated to the endpoint (in the browser). I tried using `WikidataSPARQLPageGenerator`, but it doesn't work. >>> import pywikibot >>> site = pywikibot.Site('comm

[Pywikipedia-bugs] [Maniphest] [Commented On] T344086: The WikidataBot.create_item_for_page() method doesn't return the ID of the created item, making it impossible to add claims to it

2023-08-12 Thread matej_suchanek
matej_suchanek added a comment. I guess it happens because internally `BaseBot._save_page` is asynchronous <https://gerrit.wikimedia.org/g/pywikibot/core/+/16c272108fbdb8d8d05dd6cedd6d9f3d1787c753/pywikibot/bot.py#1475> by default. Calling `create_item_for_page` with `asynchronous

[Pywikipedia-bugs] [Maniphest] [Commented On] T343655: Provide Zobject data structure for wikifunctions

2023-08-06 Thread matej_suchanek
matej_suchanek added a comment. > GadgetDefinition > Note: The GadgetDefinition can also be found on mediainfo, form and sense entity types. Is this really a Wikifunctions thing? https://codesearch.wmcloud.org/search/?q=GadgetDefinition===#Extension:Gadgets TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Commented On] T343467: provide way how to disable cosmetic_changes.py by inline parameter

2023-08-03 Thread matej_suchanek
matej_suchanek added a comment. pwb.py -help:global -cosmeticchanges Toggles the cosmetic_changes setting made in config.py -cc or user config file to its inverse and overrules it. All other settings and restrictions are untouched

[Pywikipedia-bugs] [Maniphest] [Created] T343187: Problems with logging in

2023-08-01 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION For a few weeks or months, I have constantly been getting errors such as: Traceback (most recent call last): File

[Pywikipedia-bugs] [Maniphest] [Updated] T341049: test_Coordinate_edit test of wikibase_edit_tests.TestWikibaseMakeClaimfails fails due to missing 'precision' parameter

2023-07-15 Thread matej_suchanek
matej_suchanek added a project: Pywikibot-Wikidata. TASK DETAIL https://phabricator.wikimedia.org/T341049 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Lokal_Profil, Aklapper, pywikibot-bugs-list, matej_suchanek, Xqt

[Pywikipedia-bugs] [Maniphest] [Updated] T341787: cosmetic_changes.py: Exiting due to uncaught exception AttributeError: 'NoneType' object has no attribute 'groups'

2023-07-14 Thread matej_suchanek
matej_suchanek edited projects, added Pywikibot-textlib.py; removed Pywikibot-Scripts. TASK DETAIL https://phabricator.wikimedia.org/T341787 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, Aklapper, alaa, pywikibot

[Pywikipedia-bugs] [Maniphest] [Edited] T341787: cosmetic_changes.py: Exiting due to uncaught exception AttributeError: 'NoneType' object has no attribute 'groups'

2023-07-14 Thread matej_suchanek
matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T341787 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, Aklapper, alaa, pywikibot-bugs-list, Meno25, PotsdamLamb, Jyoo1011

[Pywikipedia-bugs] [Maniphest] [Commented On] T341787: cosmetic_changes.py: Exiting due to uncaught exception AttributeError: 'NoneType' object has no attribute 'groups'

2023-07-14 Thread matej_suchanek
matej_suchanek added a comment. == header == == header == == header == are parsed as level 2 headers by MediaWiki. == header == (space between the comment and header) is not. The output is: == header == is a __level 1__ header

[Pywikipedia-bugs] [Maniphest] [Closed] T338748: Enhance extract_sections headings with level and (stripped) name attributes

2023-06-28 Thread matej_suchanek
matej_suchanek closed this task as "Resolved". matej_suchanek removed a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T338748 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, matej_suchanek Cc: Xqt, Aklapper,

[Pywikipedia-bugs] [Maniphest] [Edited] T338748: Enhance extract_sections headings with level and (stripped) name attributes

2023-06-11 Thread matej_suchanek
matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T338748 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Xqt, Aklapper, pywikibot-bugs-list, matej_suchanek, PotsdamLamb, Jyoo1011

[Pywikipedia-bugs] [Maniphest] [Commented On] T338748: Enhance extract_sections headings with level and (stripped) name attributes

2023-06-11 Thread matej_suchanek
matej_suchanek added a comment. That's precisely why such a "stripped name" should exist. ("The stripped name does not contain the equals signs." is the description of the feature.) TASK DETAIL https://phabricator.wikimedia.org/T338748 EMAIL PREFERENCES https://phabr

[Pywikipedia-bugs] [Maniphest] [Edited] T338748: Enhance extract_sections headings with level and (stripped) name attributes

2023-06-11 Thread matej_suchanek
matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T338748 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list, matej_suchanek, PotsdamLamb, Jyoo1011, JohnsonLee01

[Pywikipedia-bugs] [Maniphest] [Created] T338748: Enhance extract_sections headings with level and (stripped) name attributes

2023-06-11 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added projects: Pywikibot, Pywikibot-textlib.py. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION `extract_sections` returns sections in a list, which doesn't replicate the sections' hierarchy determined

[Pywikipedia-bugs] [Maniphest] [Commented On] T328769: Enhance Pywikibot.Page with is_person method

2023-03-28 Thread matej_suchanek
matej_suchanek added a comment. What I dislike about the proposal is that it introduces a domain-specific code to an almost completely generic interface. Indeed, I checked that almost every piece of code in `Page`/`BasePage` is site-agnostic and would work on whatever wiki you use

[Pywikipedia-bugs] [Maniphest] [Commented On] T331720: pywikibot does not respond to my calls

2023-03-24 Thread matej_suchanek
matej_suchanek added a comment. I think `-lang:ckb` is the false trace here. The upstream call that throws the exception is `langlinks = page.langlinks()`. There is probably an interwiki link to a site that Pywikibot does not recognize. TASK DETAIL https://phabricator.wikimedia.org

[Pywikipedia-bugs] [Maniphest] [Commented On] T328769: Enhance Pywikibot.Page with is_person method

2023-03-24 Thread matej_suchanek
matej_suchanek added a comment. This is too Wikimedia-specific (or even Wikipedia-specific). I'd prefer having this as a utility function or application logic rather than making it part of the model. > project is other than Wikipedia Why? TASK DETAIL ht

[Pywikipedia-bugs] [Maniphest] [Updated] T332341: getSitelink() method reports incorrect page when a page is not linked to Data repo.

2023-03-24 Thread matej_suchanek
matej_suchanek added a project: good first task. matej_suchanek added a comment. This is the source of the exception: if site not in self.sitelinks: raise NoPageError(self) The message is indeed confusing. We probably cannot change the class of the exception because

[Pywikipedia-bugs] [Maniphest] [Updated] T331796: Do not regress template counter values

2023-03-24 Thread matej_suchanek
matej_suchanek added a comment. The reason for the regression is T215247 <https://phabricator.wikimedia.org/T215247>. Imagine you have the archive partitioned by the year (month, etc.) and the counter. Then, by the year's end, the counter could have increased up to 5. When the year

[Pywikipedia-bugs] [Maniphest] [Updated] T330799: Correct documentation of site.watched_pages()

2023-03-01 Thread matej_suchanek
matej_suchanek added a project: good first task. matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T330799 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list

[Pywikipedia-bugs] [Maniphest] [Commented On] T305302: Provide tests for Lexeme classes

2023-02-11 Thread matej_suchanek
matej_suchanek added a comment. Please upload your changes as a patch for review to Gerrit <https://www.mediawiki.org/wiki/Manual:Pywikibot/Development#Development>, where the code can be reviewed. TASK DETAIL https://phabricator.wikimedia.org/T305302 EMAIL PREFERENCES

[Pywikipedia-bugs] [Maniphest] [Commented On] T305302: Provide tests for Lexeme classes

2023-02-05 Thread matej_suchanek
matej_suchanek added a comment. Yes, or `wikibase_edit_tests.py`, if you plan testing write actions. TASK DETAIL https://phabricator.wikimedia.org/T305302 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Ayush_Anand3310

[Pywikipedia-bugs] [Maniphest] [Commented On] T305302: Provide tests for Lexeme classes

2023-02-01 Thread matej_suchanek
matej_suchanek added a comment. Yes, Pywikibot already uses that library. TASK DETAIL https://phabricator.wikimedia.org/T305302 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Ayush_Anand3310, matej_suchanek, Aklapper, Xqt

[Pywikipedia-bugs] [Maniphest] [Commented On] T308265: Use inline re.flags in Pywikibot

2023-01-20 Thread matej_suchanek
matej_suchanek added a comment. No, keep it for now. TASK DETAIL https://phabricator.wikimedia.org/T308265 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ayush_Anand3310, matej_suchanek Cc: matej_suchanek, Ayush_Anand3310, Aklapper, pywikibot

[Pywikipedia-bugs] [Maniphest] [Reopened] T308261: Access match object groups by item name instead of group() method

2023-01-20 Thread matej_suchanek
matej_suchanek reopened this task as "Open". matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T308261 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Ayush_Anand3310, matej_suchanek Cc: Ayush

[Pywikipedia-bugs] [Maniphest] [Block] T308258: Pywikibot 8 tasks (Tracking)

2023-01-20 Thread matej_suchanek
matej_suchanek reopened subtask T308261: Access match object groups by item name instead of group() method as Open. TASK DETAIL https://phabricator.wikimedia.org/T308258 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: binbot

[Pywikipedia-bugs] [Maniphest] [Updated] T186200: Rewrite Wikibase data model implementation

2023-01-18 Thread matej_suchanek
matej_suchanek added a subtask: T327205: Pywikibot Claim inconsistency with sources vs references. TASK DETAIL https://phabricator.wikimedia.org/T186200 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Xqt, SilentSpike

[Pywikipedia-bugs] [Maniphest] [Updated] T327205: Pywikibot Claim inconsistency with sources vs references

2023-01-18 Thread matej_suchanek
matej_suchanek added a parent task: T186200: Rewrite Wikibase data model implementation. TASK DETAIL https://phabricator.wikimedia.org/T327205 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, Aklapper, RPI2026F1

[Pywikipedia-bugs] [Maniphest] [Created] T326762: Support Wikimedia Commons Query Service

2023-01-11 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added projects: Pywikibot-Commons, Pywikibot-Wikidata, Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION Unlike Wikidata Query Service, authentication is required. There is a manual on how

[Pywikipedia-bugs] [Maniphest] [Updated] T308265: Use inline re.flags in Pywikibot

2023-01-09 Thread matej_suchanek
matej_suchanek added a project: good first task. matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T308265 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list, Xqt

[Pywikipedia-bugs] [Maniphest] [Updated] T308261: Access match object groups by item name instead of group() method

2023-01-09 Thread matej_suchanek
matej_suchanek added a project: good first task. matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T308261 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Aklapper, pywikibot-bugs-list, Xqt

[Pywikipedia-bugs] [Maniphest] [Closed] T326510: How can I obtain the resolution or the image size from an SDC image via Pywikibot?

2023-01-09 Thread matej_suchanek
matej_suchanek closed this task as "Invalid". matej_suchanek added a comment. SDC does not seem to provide this information. It's accessible for files on all wikis using: >>> import pywikibot >>> commons = pywikibot.Site('commons:commons') >>&

[Pywikipedia-bugs] [Maniphest] [Unblock] T223820: Properly implement structured data access on Commons in Pywikibot

2023-01-04 Thread matej_suchanek
matej_suchanek closed subtask T173195: Implement federated Wikibase in Pywikibot as Resolved. TASK DETAIL https://phabricator.wikimedia.org/T223820 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Alicia_Fagerving_WMSE

[Pywikipedia-bugs] [Maniphest] [Closed] T173195: Implement federated Wikibase in Pywikibot

2023-01-04 Thread matej_suchanek
matej_suchanek closed this task as "Resolved". matej_suchanek claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T173195 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, David_Haskiya_WMSE,

[Pywikipedia-bugs] [Maniphest] [Commented On] T189321: Support for Lexicographical data/WikibaseLexeme in Pywikibot

2023-01-01 Thread matej_suchanek
matej_suchanek added a comment. There are still some gaps, and the support is somewhat lame (e.g., not possible to create a lexeme). I had already updated a similar warning <https://www.wikidata.org/w/index.php?title=Wikidata:Creating_a_bot=1661369914=1656421200=source> on

[Pywikipedia-bugs] [Maniphest] [Commented On] T325915: pywikibot throws mwoauth-invalid-authorization-invalid-user when calling editEntity() with no arguments

2022-12-25 Thread matej_suchanek
matej_suchanek added a comment. Maybe there is a way to optimize `SiteLinkCollection.toJSON` further so that we don't do unnecessary API calls (though they get cached). But this would not fix the problem because sometimes you really have to read a different site information

[Pywikipedia-bugs] [Maniphest] [Commented On] T324401: Allow Pywikibot to stack edits to items

2022-12-05 Thread matej_suchanek
matej_suchanek added a comment. > Plus it requires knowledge of how the editEntity dictionary needs to be structured, which isn't readily available for non-trivial examples. It does not, I'm not building any dictionary in my example. You first stack the changes by setting/appending d

[Pywikipedia-bugs] [Maniphest] [Commented On] T324401: Allow Pywikibot to stack edits to items

2022-12-04 Thread matej_suchanek
matej_suchanek added a comment. Just make all changes to the item's attributes and then call `item.editEntity`: item = pywikibot.ItemPage(repo, 'Q123') item.labels['en'] = 'English label' item.descriptions['de'] = 'German description' claim = pywikibot.Claim(repo

[Pywikipedia-bugs] [Maniphest] [Commented On] T321408: NoUsernameError on specific pywikibot classes

2022-10-23 Thread matej_suchanek
matej_suchanek added a comment. It works for me: >>> import pywikibot >>> repo = pywikibot.Site('wikidata:wikidata') >>> item = pywikibot.ItemPage(repo, 'Q114776071') >>> item ItemPage('Q114776071') >>> import

[Pywikipedia-bugs] [Maniphest] [Commented On] T318034: editAliases makes nothing

2022-09-19 Thread matej_suchanek
matej_suchanek added a comment. > Nothing happens, no error, but also no action on wikidata. It used to work. //Errors should never pass silently.// So this should be fixed. > Should this task become a feature request to enable single strings? I am hesitant about this

[Pywikipedia-bugs] [Maniphest] [Commented On] T314763: Merging Wikidata items triggers EntityContentTooBigException

2022-08-26 Thread matej_suchanek
matej_suchanek added a comment. But I wonder what `EntityContentTooBigException` has to do with #pywikibot <https://phabricator.wikimedia.org/tag/pywikibot/>... TASK DETAIL https://phabricator.wikimedia.org/T314763 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings

[Pywikipedia-bugs] [Maniphest] [Commented On] T314763: Merging Wikidata items triggers EntityContentTooBigException

2022-08-26 Thread matej_suchanek
matej_suchanek added a comment. In T314763#8184989 <https://phabricator.wikimedia.org/T314763#8184989>, @Mike_Peel wrote: > Adding pywikibot tag - does any pywikibot developer have thoughts about saving multiple changes in one edit? You can create an item in a single

[Pywikipedia-bugs] [Maniphest] [Claimed] T314889: harvest_template.py - missing documentation for -inverse parameter

2022-08-10 Thread matej_suchanek
matej_suchanek claimed this task. TASK DETAIL https://phabricator.wikimedia.org/T314889 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Ejegg, matej_suchanek, Aklapper, JAnD, pywikibot-bugs-list, Hellket777, LisafBia6531, 786

[Pywikipedia-bugs] [Maniphest] [Commented On] T313886: archivebot may fall into infinite loop

2022-08-07 Thread matej_suchanek
matej_suchanek added a comment. In T313886#8111808 <https://phabricator.wikimedia.org/T313886#8111808>, @Xqt wrote: > There is a similar problem when `maxarchivesize = 0T` That makes no sense. What about raising an exception on the encounter (during the validation)? TA

[Pywikipedia-bugs] [Maniphest] [Updated] T173645: replace.py should not crash when it does a replacement in Module: and get rejected by API for changing content model

2022-07-26 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T173645 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Liuxinyu970226, Xqt, matej_suchanek, Aklapper, Kizule, pywikibot-bugs-list

[Pywikipedia-bugs] [Maniphest] [Updated] T313785: Archive variables being changed onwiki and saved as such

2022-07-26 Thread matej_suchanek
matej_suchanek added a comment. This should be fixed on master since rPWBC51787100619d: [BUGFIX] Add localized "archive" variables to archivebot.py <https://phabricator.wikimedia.org/rPWBC51787100619d32eaa9ce025720d0d93f3e5cc2e1>. TASK DETAIL https://phabricator.wikim

[Pywikipedia-bugs] [Maniphest] [Updated] T66503: Add datatype time to harvest_template.py for importing dates

2022-07-22 Thread matej_suchanek
matej_suchanek removed a project: User-notice. matej_suchanek added a comment. > I'm still uncertain about whether it belongs in Tech News. Perhaps it should instead just be within the Wikidata newsletter? i.e. https://www.wikidata.org/wiki/Wikidata:Status_updates/Next Tha

[Pywikipedia-bugs] [Maniphest] [Updated] T66503: Add datatype time to harvest_template.py for importing dates

2022-07-20 Thread matej_suchanek
matej_suchanek edited projects, added User-notice; removed Patch-For-Review. matej_suchanek changed the subtype of this task from "Task" to "Feature Request". matej_suchanek moved this task from Framework to Backlog on the Pywikibot-Wikidata board.

[Pywikipedia-bugs] [Maniphest] [Commented On] T312755: Site.parsevalue() gives wrong results

2022-07-11 Thread matej_suchanek
matej_suchanek added a comment. Yes, it probably depends on the language. When you edit e.g. dates on Wikidata manually, it will try to parse the input in your language (or English). I think it can be changed using `uselang= So maybe we should always force parsing in English and add

[Pywikipedia-bugs] [Maniphest] [Updated] T112140: Provide a wrapper function in pywikibot around wbparsevalue

2022-07-11 Thread matej_suchanek
matej_suchanek removed a project: Patch-Needs-Improvement. TASK DETAIL https://phabricator.wikimedia.org/T112140 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, matej_suchanek Cc: gerritbot, Louperivois, PokestarFan, Lokal_Profil, Tobias1984

[Pywikipedia-bugs] [Maniphest] [Reopened] T112140: Provide a wrapper function in pywikibot around wbparsevalue

2022-07-05 Thread matej_suchanek
matej_suchanek reopened this task as "Open". matej_suchanek moved this task from Backlog to Ready to go on the Pywikibot-Wikidata board. TASK DETAIL https://phabricator.wikimedia.org/T112140 WORKBOARD https://phabricator.wikimedia.org/project/board/110/ EMAIL PREFERENC

[Pywikipedia-bugs] [Maniphest] [Block] T112141: Update harvest_template.py to use wbparsevalue and accept arbitrary datatypes

2022-07-05 Thread matej_suchanek
matej_suchanek reopened subtask T112140: Provide a wrapper function in pywikibot around wbparsevalue as Open. TASK DETAIL https://phabricator.wikimedia.org/T112141 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Multichill

[Pywikipedia-bugs] [Maniphest] [Claimed] T173238: Harvest_template should be able to add reciprocal claims

2022-07-05 Thread matej_suchanek
matej_suchanek claimed this task. matej_suchanek changed the subtype of this task from "Task" to "Feature Request". matej_suchanek moved this task from Backlog to Ready to go on the Pywikibot-Wikidata board. TASK DETAIL https://phabricator.wikimedia.org/T17323

[Pywikipedia-bugs] [Maniphest] [Updated] T218287: newitem.py: AttributeError: 'NoneType' object has no attribute 'output'

2022-06-20 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T218287 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Multichill, Xqt, Aklapper, Steenth, pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH

[Pywikipedia-bugs] [Maniphest] [Commented On] T310355: Allow harvest_template.py to filter data

2022-06-15 Thread matej_suchanek
matej_suchanek added a comment. Beware, `-grep` is already reserved for pagegenerators: -grep A regular expression that needs to match the article otherwise the page won't be returned. Multiple -grep:regexpr can be provided

[Pywikipedia-bugs] [Maniphest] [Commented On] T310356: allow -confirm for harvest_template.py

2022-06-15 Thread matej_suchanek
matej_suchanek added a comment. class HarvestRobot(ConfigParserBot, WikidataBot): update_options = { 'always': True, 'create': False, 'exists': '', 'islink': False, 'multi': False, } The bot always runs

[Pywikipedia-bugs] [Maniphest] [Reassigned] T308245: New wikidata claims ignored by itemPage.editEntity

2022-05-15 Thread matej_suchanek
matej_suchanek reassigned this task from Xqt to William_Avery. matej_suchanek edited projects, added Pywikibot-Wikidata; removed Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T308245 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences

[Pywikipedia-bugs] [Maniphest] [Commented On] T305937: default parameter of bot.input_list_choice does not work as described

2022-04-14 Thread matej_suchanek
matej_suchanek added a comment. `UI.input_list_choice` does not handle the default from `self.input(...)`: while True: choice = self.input(question, default=default, force=force) try: choice = int(choice) - 1 except (TypeError, ValueError

[Pywikipedia-bugs] [Maniphest] [Updated] T305918: Missing 'reference' key when trying to addSources

2022-04-12 Thread matej_suchanek
matej_suchanek added a comment. SIMULATION: wbsetreference action blocked. I think this is the problem. If there is a fake response, it doesn't have data that the real server would send. (T76694 <https://phabricator.wikimedia.org/T76694>) TASK DETAIL

[Pywikipedia-bugs] [Maniphest] [Changed Project Column] T189321: Support for Lexicographical data/WikibaseLexeme in Pywikibot

2022-04-02 Thread matej_suchanek
matej_suchanek moved this task from Needs Review to Backlog on the Pywikibot board. matej_suchanek added a comment. Not everything is done, some methods are stubs that just raise an error. TASK DETAIL https://phabricator.wikimedia.org/T189321 WORKBOARD https://phabricator.wikimedia.org

[Pywikipedia-bugs] [Maniphest] [Closed] T302774: RuntimeError: dictionary changed size during iteration

2022-03-02 Thread matej_suchanek
matej_suchanek assigned this task to Xqt. matej_suchanek closed this task as "Resolved". TASK DETAIL https://phabricator.wikimedia.org/T302774 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Xqt, matej_suchanek Cc: Xqt, Aklapper, mate

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. In T302774#7744751 <https://phabricator.wikimedia.org/T302774#7744751>, @Xqt wrote: >> it actually varies, I also got {'stdnum.ean'} or {'stdnum.exceptions'}. > > Does this behaviour change if cosmetic_changes is disabled? I beli

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. In T302774#7744693 <https://phabricator.wikimedia.org/T302774#7744693>, @Xqt wrote: > In T302774#7744689 <https://phabricator.wikimedia.org/T302774#7744689>, @matej_suchanek wrote: > >> In T302774#7744683 <https://phabri

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. In T302774#7744683 <https://phabricator.wikimedia.org/T302774#7744683>, @Xqt wrote: > Just an idea to find out which module was changed, could you please change these lines in bot.py arround line 504 and below: It printed `{'pydoc'}`. (My

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. After some debugging, I suspect this could be related to the asynchronous requests spawned when you confirm a replacement in `replace.py`. It only happens sometimes and I think it did not happen if I had cosmetic changes turned off. TASK DETAIL https

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. I've made up one that currently crashes for me (even if you `-simulate`): `pwb.py replace -regex "ť[eě]\b" "tě" -summary:"oprava překlepu" -ns:0 -search:"insource:/ť[eě][ .,]/" -lang:cs -family:w

[Pywikipedia-bugs] [Maniphest] [Edited] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T302774 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Xqt, Aklapper, matej_suchanek, pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH

[Pywikipedia-bugs] [Maniphest] [Commented On] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek added a comment. I forgot to completely mention it's on Python 3.10... TASK DETAIL https://phabricator.wikimedia.org/T302774 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Xqt, Aklapper, matej_suchanek

[Pywikipedia-bugs] [Maniphest] [Created] T302774: RuntimeError: dictionary changed size during iteration

2022-03-01 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added a project: Pywikibot. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION Run an interactive script `pwb.py replace` and confirm an edit. **What happens?**: RuntimeError: dictionary changed

[Pywikipedia-bugs] [Maniphest] [Commented On] T301908: Drop support for Python 3.5

2022-02-17 Thread matej_suchanek
matej_suchanek added a comment. At least bullets 2, 3, 4, and 10 are convincing. > If we keep 3.6, I suggest only 3.6.1+. Why so? TASK DETAIL https://phabricator.wikimedia.org/T301908 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferen

[Pywikipedia-bugs] [Maniphest] [Created] T299309: debug() missing 1 required positional argument: 'layer'

2022-01-16 Thread matej_suchanek
matej_suchanek created this task. matej_suchanek added projects: Pywikibot, Regression. Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. TASK DESCRIPTION name=pywikibot/site/_tokenwallet.py from pywikibot import debug debug('Token {!r} was replaced by {!r

[Pywikipedia-bugs] [Maniphest] [Commented On] T294836: Calls to pywikibot.Page.exists() throw an InvalidPageError

2021-11-03 Thread matej_suchanek
matej_suchanek added a comment. Can't reproduce either. But I see `self.prefix` is not defined always. I suspect there was some unexpected API response that brought the `PropertyGenerator` to an inconsistent state. And maybe it's cached somewhere on your side. TASK DETAIL https

[Pywikipedia-bugs] [Maniphest] [Updated] T224283: claimit.py crashes after couple of pages "The statement has already a reference with hash"

2021-08-05 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T224283 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, Xqt, pywikibot-bugs-list, Aklapper, JAnD, Liuxinyu970226, Jyoo1011

[Pywikipedia-bugs] [Maniphest] [Commented On] T286867: Drop support for Python 3.5.0 - 3.5.2

2021-07-19 Thread matej_suchanek
matej_suchanek added a comment. I'm fine with this. I guess strict 3.6+ support will be a greater challenge. TASK DETAIL https://phabricator.wikimedia.org/T286867 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: Salween, Lee

[Pywikipedia-bugs] [Maniphest] [Updated] T212074: test_fromPage_noitem tests of wikibase_tests.TestItemLoad fails with AttributeError

2021-07-13 Thread matej_suchanek
matej_suchanek added a project: TestMe. TASK DETAIL https://phabricator.wikimedia.org/T212074 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: matej_suchanek Cc: matej_suchanek, Framawiki, Aklapper, Dalba, Xqt, pywikibot-bugs-list, Jyoo1011

[Pywikipedia-bugs] [Maniphest] [Commented On] T286018: api_tests.TestPropertyGenerator.test_two_continuations_limited fails with AttributeError

2021-07-02 Thread matej_suchanek
matej_suchanek added a comment. So obviously this happened due to some server problem and non-JSON response where JSON is expected (except `ValueError` in `Request._json_loads`). Why this happened is a mystery for me, but it isn't really important. Further down: name=pywikibot/data

[Pywikipedia-bugs] [Maniphest] [Closed] T213904: Implement file captions in Pywikibot

2021-07-02 Thread matej_suchanek
matej_suchanek closed this task as "Resolved". matej_suchanek added a comment. import pywikibot file_repo = pywikibot.Site('commons', 'commons') file_page = pywikibot.FilePage(file_repo, 'Würfelzucker_--_2018_--_3564.jpg') file_item = file_page.data_item()

  1   2   3   4   5   6   7   >