# User talk:Ivan A. Krestinin

Active discussions
(Redirected from User talk:KrBot)
 On this page, old discussions are archived. An overview of all archives can be found at this page's archive index. The current archive is located at User talk:Ivan A. Krestinin/Archive.

## Constraints not updating?

Hi - I've been watching Wikidata:Database reports/Constraint violations/P356 and it updated 3 times in early January, but hasn't done so for over a week now. Something blocking the bot? ArthurPSmith (talk) 20:33, 22 January 2020 (UTC)

Hi Arthur, I fixed two issues. Update frequency will increased as I hope. — Ivan A. Krestinin (talk) 20:32, 1 February 2020 (UTC)
Out of curiosity, what would it take to run these updates daily? Is the bottleneck computing power, or something else? Thanks. Mike Peel (talk) 20:39, 1 February 2020 (UTC)
Bottleneck is computing power. More efficient algorithms may help also. — Ivan A. Krestinin (talk) 18:15, 4 April 2020 (UTC)

## Code?

Out of curiosity, is the code for KrBot available somewhere? I'm interested in looking at how you find the constraint violations, as that could improve the efficiency of some of Pi bot (talkcontribslogs)'s tasks. Thanks. Mike Peel (talk) 20:29, 25 January 2020 (UTC)

Hi Mike, the code is not available in public. Generally bot downloads Wikidata dumps, load its and check all values using different constraints. The code is written on C++ and uses several custom libraries. So it will not very useful for you as I think. But I can provide details about parts that are interesting for you. — Ivan A. Krestinin (talk) 20:26, 1 February 2020 (UTC)
Bottleneck of my bot is dumps management. Currently bot loads all values of all properties from dumps into memory. This is long process due to dumps size. I am improving this mechanism now. I hope the improvements will increase update frequency. You can try to load needed values directly from Wikidata DB. It should be possible on https://tools.wmflabs.org. This will allow you to get more actual data. About P373: I also have bot that fixes wrong Commons category (P373) links. — Ivan A. Krestinin (talk) 21:00, 1 February 2020 (UTC)
I hope you don't mind, but I've raised this at Wikidata:Contact_the_development_team#Increasing_the_frequency_of_constraint_violation_report_updates - you provide a vital service, and it would be good if this was better supported. I'll follow up about P373 soon. Thanks. Mike Peel (talk) 21:33, 1 February 2020 (UTC)

## Unique/Single value constraints – one item/value listed twice as a violation

Hey, I just want to let you know that user:KrBot2 listed some violations in a wierd manner: [2]. One item is listed twice as a violation of a unique value violation and one value is listed twice as a single value violation. Wostr (talk) 11:38, 1 February 2020 (UTC)

…and in many other reports, some really extreme ones being Wikidata:Database reports/Constraint violations/P2639 (ca. 3400 false positives) and Wikidata:Database reports/Constraint violations/P2250 (1000+ false positives). (@Wostr: The fact that the same item shows up as a unique value violation and the same value shows up as a single value violation does not necessarily mean that the bot is wrong: sometimes people add the same value twice—usually using some sort of (semi)automated edit—, and then it’s right to list these as violations. But that’s not the case now, at least not for the most of the reported violations.) —Tacsipacsi (talk) 12:28, 1 February 2020 (UTC)
Hi, thank you for the report. The issue is fixed. Please wait for the next update. — Ivan A. Krestinin (talk) 20:17, 1 February 2020 (UTC)
Just a comment that I noticed this too, particularly on the report for DOI (P356) - suddenly there are over 400,000 violations of the single-value constraint! ArthurPSmith (talk)

Hi Ivan, if it's bug fixing time, could you please look at the discussion here? Not sure if you noticed my ping there. The community thinks that deprecated values should not trigger the unique value violation... Is that fixable or not? Cheers, Vojtěch Dostál (talk) 22:22, 1 February 2020 (UTC)

@Ivan A. Krestinin: You made an update on Feb 1. 2020 but the bug is still not fixed. -- MovieFex (talk) 12:59, 5 February 2020 (UTC)
The same problem in Wikidata:Database reports/Constraint violations/P6359. -- MovieFex (talk) 13:16, 5 February 2020 (UTC)
The February 1 update was the one that went wrong (see the above timestamps), of course it’s not fixed. The next one should be good. —Tacsipacsi (talk) 13:52, 5 February 2020 (UTC)

## KrBot and maxlag

Hi! I see from Special:Contributions/KrBot that this bot is currently editing at about 100 edits per minute, but maxlag is currently at 17. How do you account for this? See also Wikidata:Administrators'_noticeboard#WDQS_lag_is_terrible_(over_9_hours_now) and mw:Manual:Maxlag_parameter. Cheers, Bovlb (talk) 16:57, 10 February 2020 (UTC)

## Wrong merge and consequences

Hi,

Last November, an IP wrongly merged brigand (Q20650523) and Dacoity (Q17176963). The merge has been undone been meanwhile KrBot resolved the redirection (which was a good idea in theory but not in this specific case). Could KrBot now undo this batch https://tools.wmflabs.org/editgroups/b/KrBotResolvingRedirect/Q20650523_Q17176963/ ?

Cheers, VIGNERON (talk) 18:34, 11 February 2020 (UTC)

## 2020-02 KrBot2

Hello,

Could you run KrBot2 every 5 day? Visite fortuitement prolongée (talk) 14:19, 15 February 2020 (UTC)

Or at least, allow the bot to be triggered manually like ListeriaBot. That would be very useful, if you have time. Just noticed that the P7882 report is old. --Ysangkok (talk) 17:53, 27 February 2020 (UTC)
Bot cycle is ~5 days now. It works automatically. My current attempt to reduce the time fails. I hope the next attempt will be more successful. — Ivan A. Krestinin (talk) 18:08, 4 April 2020 (UTC)
Thank you very much. Visite fortuitement prolongée (talk) 22:39, 5 April 2020 (UTC)

## Wrong ISBN-13 to ISBN-10 transfer

I have rolled back your update. You removed the correct ISBN-13 value and wrongly used it as a (wrong) ISBN-10 value. Geertivp (talk) 09:59, 18 February 2020 (UTC)

## KrBot block

Hey Ivan, your bot ignores the maxlag parameter since 2 PM today, thus I blocked it now. You can see its edit pattern in these Grafana charts, particularly in the "Max Single User Edit Rate" panel. It is your bot which accounts for the ~100 edits/min in that chart, and it obviously does not stop during phases of high database load.

Since server resources are unfortunately very limited, I had to block the bot. All other bot operators do respect the maxlag parameter as indicated by the Wikidata:Bots policy, and it is only fair if you do so as well. Please let me know when you have implemented it properly, as the bot can then be unblocked again of course. In case of questions, feel free to ask. —MisterSynergy (talk) 17:48, 6 March 2020 (UTC)

Related to this, can you please collapse these edits into one edit? I assume you're using https://www.wikidata.org/w/api.php?action=help&modules=wbsetdescription , with https://www.wikidata.org/w/api.php?action=help&modules=wbeditentity you can just do it in one edit like in the example. Multichill (talk) 15:55, 7 March 2020 (UTC)
•   Done, maxlag=5 is added, wbsetdescription is replaced to wbeditentity (except cases with conflicting descriptions). — Ivan A. Krestinin (talk) 17:50, 4 April 2020 (UTC)
• Thanks, I have unblocked your bot account. —MisterSynergy (talk) 18:24, 4 April 2020 (UTC)

## Wikidata:Database reports/Constraint violations/P856

The last successful update to this page by your bot was over half a year ago. It should nowiki all links if it runs into the spam blacklist. (By the way, I think facebookcorewwwi.onion (Q24590047)’s constraint violation causes triggers the spam blacklist, but that’s not important, as the bot doesn’t need to detect it, just nowiki everything.) —Tacsipacsi (talk) 00:59, 23 March 2020 (UTC)

## Please remove **non**-violations from reports (green boxes)

The bot posts statistics about cases which are NOT violations. This complicates the task for checking properties as these properties then have links pointing to them as "Report/Pnnn/violations" when in fact there are none: we have to search each property by their Qid in some very long pages (very long because of violations reported there).

Please remove the "green" boxes for these report pages, only list the violations (red boxes). Notably for the generated tables for "Allowed types" listing all references (valid or not).

You may want to report instead on other pages (not "violation" pages) the cases where there are no violation detected, but I think it is just not needed at all.

Thanks. Verdy p (talk) 05:50, 23 March 2020 (UTC)

I think the green boxes are a quite useful feature, they help getting a picture about how the property is used. Maybe they could use external links instead of internal ones, although I don’t know how external links work with displaying labels (whether getting label generates a backlink, how much more complicated the module becomes with this extra feature etc.). —Tacsipacsi (talk) 00:01, 24 March 2020 (UTC)

Hi. I have seen your bot removing the suffixes E and F from the values. Please do not do that. The english entries with E are deprecated, as those have been merged into the NACO authority file. The french entries with F are still valid and are used as a base for the new "Canadian name authorities in french" file, which is part of VIAF. Example: [3] --Sotho Tal Ker (talk) 20:34, 15 April 2020 (UTC)

This job is stopped. — Ivan A. Krestinin (talk) 20:57, 15 April 2020 (UTC)

## Wikidata:Database reports/Constraint violations/P345

Hello Ivan, your last update 2020-04-20 was with old data from 2020-04-13. If you have such a long time between the update intervalls it would be nice to have an actual data record. At the moment it takes 2 updates to get data nearly 2 weeks old. This cannot be the sense of an update. -- MovieFex (talk) 11:37, 21 April 2020 (UTC)

Hello, current update interval is 5 days unfortunately. — Ivan A. Krestinin (talk) 18:36, 25 April 2020 (UTC)
You do not understand what I'm trying to say. Last update was today (2020-05-05) with data from 2020-04-29. Every correction from that status was not considered. Why didn't you took actual data from today or not more older than yesterday? Don't you see that the lists of constraint violations grow and grow? How should anyone work with an update which is absolutely outdated? -- MovieFex (talk) 22:22, 5 May 2020 (UTC)
Bot needs 5 days to process the data. So I understand the issue, but it is not simple to fix it. — Ivan A. Krestinin (talk) 16:24, 8 May 2020 (UTC)
Hello, is it possible to include that the labels are shown like User:Queryzo did here? -- MovieFex (talk) 18:17, 26 May 2020 (UTC)

## category

Ivan, do you can to get the category in hebrew: קטגוריה:טקסונים שתוארו בידי תומאס הנרי האקסלי to the file: Category:Taxa named by Thomas Henry Huxley in another launguges? 2A01:6500:A051:379A:2008:67A5:30CE:7E4F 13:50, 23 April 2020 (UTC)
I have no idea that is wrong. Looks like bug. It is better to discuss it here: MediaWiki_talk:Gadget-Merge.js#Unexpected_error_while_merging. — Ivan A. Krestinin (talk) 18:32, 25 April 2020 (UTC)

Hi! A little question: I remember that KrBot, among other extremely useful functions, also updates VIAF ID (P214) removing deleted clusters and correcting redirects; in general, 1) how frequent are the updates 2) when was the last update and 3) when will the next update take place? Thank you very much also from @Bargioni:, --Epìdosis 14:52, 8 May 2020 (UTC)

Hello! Update frequency is limited by appearing new dumps on http://viaf.org/viaf/data/. New dump appears today, so updating is in progress now. Usually this happens once per month. — Ivan A. Krestinin (talk) 16:11, 8 May 2020 (UTC)
Really great! Thank you very much! --Epìdosis 19:08, 9 May 2020 (UTC)
Thx, Ivan. -- Bargioni 🗣 09:48, 11 May 2020 (UTC)

## Value Taipei, China (Q30940804) will be automatically replaced to value Chinese Taipei (Q216923)

Hi Ivan, I do not agree with the automatic deletion of Taiwan (Q865) from country for sport (P1532). Krdbot replaces Taiwan with Chinese Taipei. Wanted was to replace Taipei, China with Chinese Taipei. I do not agree with this one-sided following of Chinese politics and ignoring Taiwanese politics. --Florentyna (talk) 04:38, 14 May 2020 (UTC)

Hello, could you provide link to the edit? — Ivan A. Krestinin (talk) 08:54, 14 May 2020 (UTC)
See for instance [4]. At the end for all people with occupation [P106] badminton player [Q13141064] and country Taiwan [Q865], where everytime were in country for sport [P1532] both values: Taiwan [Q865] and Chinese Taipei [Q216923]. Taiwan was everywhere deleted from this property. --Florentyna (talk) 05:08, 15 May 2020 (UTC)
I disabled the autofix rules. — Ivan A. Krestinin (talk) 08:32, 15 May 2020 (UTC)
Thanks a lot! --Florentyna (talk) 09:15, 15 May 2020 (UTC)

## GND ID replacement of redirected ids

Please stop [5]. The IDs are still valid and resolve. They are used in third party websites. Removing them, breaks links to WD by P227 and the ability to see which IDs are merged in GND database. Additionally in the case above the inserted value was left with "deprecated" label, existed already as preferred and the bot has been reverted before. Pinging @Kolja21: who works on GND. MrProperLawAndOrder (talk) 18:41, 18 May 2020 (UTC)

@Raymond: FYI: You made the same suggestion on deWP. --Kolja21 (talk) 19:22, 18 May 2020 (UTC)

Also, the edit has no edit group, no batch number so how can one see all edits done in the same run? And, can you in general provide more documentation of the bot runs? A page for each task? MrProperLawAndOrder (talk) 18:47, 18 May 2020 (UTC)

Thank you MrProperLawAndOrder and Kolja21 for bringing this up. I am working on GND together with the "Deutsche Nationalbibliothek" since > 10 years. The IDs are deprecated but still valid and resolve. This fact is an important information for all users incl. 3rd party users who use Wikidata as authority control data hub. Raymond (talk) 19:44, 18 May 2020 (UTC)
@Kolja21, Raymond: I think, they should even be imported by some bot. I don't know if this is in VIAF and KrBot can do it (monthly), or it has to be done by GND dump (not regular). Raymond, what is the exact terminology used by DNB for the merged/redirected values? Do they call it "deprecated". Because in WD there are three levels, in the case above one value is preferred, one deprecated and no value normal. How to do this exactly should probably discussed on P227 talk. Or better for all VIAF components since other libraries probably also merge and redirect. MrProperLawAndOrder (talk) 20:49, 18 May 2020 (UTC)
Imho we don't need to import redirects. Many of them had a low cataloguing level or had been Tns. These IDs should only be kept in Wikidata when they where added with a source and used by other databases. --Kolja21 (talk) 20:56, 18 May 2020 (UTC)
Kolja21, the source would be GND. DtBio also stores them, I have seen that old IDs are redirected on their website. Very professional. But I think that that excludes Tns. When I proposed importing GND IDs, I only meant the redirects, not Tns. MrProperLawAndOrder (talk) 23:17, 24 May 2020 (UTC)

Similarly, I reverted you here: Q64633427. Your bot changed the value of a deprecated VIAF statement!!! Vojtěch Dostál (talk) 13:54, 24 May 2020 (UTC)

@Vojtěch Dostál: ongoing also with GND [6], breaking any resolver. MrProperLawAndOrder (talk) 23:17, 24 May 2020 (UTC)

BTW @Vojtěch Dostál: I would differentiate between:
--Kolja21 (talk) 00:34, 25 May 2020 (UTC)
@Kolja21 Good point, will do in future. Vojtěch Dostál (talk) 05:47, 25 May 2020 (UTC)

Still doing it [7]. MrProperLawAndOrder (talk) 02:40, 30 May 2020 (UTC)

I deleted the IDs. VIAF contains huge number of redirects. Several IDs for each item actually. Adding only some deprecated IDs make our data inconsistent. Adding all deprecated IDs will increase amount of data significantly. Adding such IDs to Wikidata makes the data usage more hard and add nothing to our data quality. I think we should focus on data collection instead of garbage collection. — Ivan A. Krestinin (talk) 20:00, 30 May 2020 (UTC)
@Vojtěch Dostál, Kolja21, Raymond: "garbage collection", "add nothing to our data quality" - no insight he is actually listening to the concerns. I agree, it is inconsistent to have only some - for a given source, but then add the others. Here two kinds of IDs were mentioned, VIAF ID and GND ID. Replacing GND ID is not doing work on VIAF, since the GND IDs are contained in the GND DB and as explained above are still used by third parties. Yes, maintenance is harder, but it isn't "garbage", it is verifiable information, useful for some.
Last but not least: No response regarding "Additionally in the case above the inserted value was left with "deprecated" label". MrProperLawAndOrder (talk) 04:15, 31 May 2020 (UTC)
And, as if there is no need to care for consensus, now deleting IDs manually [8] MrProperLawAndOrder (talk) 04:26, 31 May 2020 (UTC)
Please stop doing this, Ivan, until we find consensus. We need to establish some community spirit in Wikidata and this behaviour is going exactly the other way... Vojtěch Dostál (talk) 06:47, 31 May 2020 (UTC)
Please stop deleting deprecated IDs. These are a valueable information for our users who looking them up and want to know what are the current IDs, not only for VIAF but for all kind of IDs. Raymond (talk) 08:36, 31 May 2020 (UTC)

## Constraint violations P650

For Property:P650 (RKDArtists ID), single value constraint has recently been changed to single best value constraint to make sure that multiple values are not seen as a violation if one of them is set to preferred. However, the single value violation report still lists items with two values where one value is set to normal rank and the other is set to deprecated (for example Q6539264). Is there a way to exclude those from the report? Best, --RKDdata (talk) 07:50, 28 May 2020 (UTC)

Bot uses the same algorithm for single best value constraint as for single value constraint for now. It is not simple to fix this unfortunately. — Ivan A. Krestinin (talk) 20:03, 30 May 2020 (UTC)
Thanks for letting me know. I think I found a way around this. A regular query on items with P650 excludes all items with multiple RKDartists IDs if one of them is set to preferred and/or deprecated. That means that only the items on that list that still have multiple P650 statements need to be checked. --RKDdata (talk) 11:42, 8 June 2020 (UTC)

## Using item template for constraint reports

Is there a reason why the constraint reports like https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violations/P21#Allowed_qualifiers use Wikilinks [[...]] instead of the templates {{Q|...}} and {{P|...}}. It seems to me the pages would be more readable when the templates would be used. ChristianKl❫ 17:04, 11 June 2020 (UTC)

Probably because so many instances of the template would (potentially) cause script errors. Tip: if you load the page through a diff (e.g. https://www.wikidata.org/w/index.php?title=Wikidata:Database_reports/Constraint_violations/P21&diff=0), MediaWiki automatically displays labels for bare links, although exactly because of this it’s more likely to time out and show only a WMFTimeoutException (e.g. P21 loads for me, but https://www.wikidata.org/w/index.php?title=Wikidata:Database_reports/Constraint_violations/P18&diff=0 times out). —Tacsipacsi (talk) 23:34, 11 June 2020 (UTC)
You are right. Bot uses {{Q|...}} and {{P|...}} when number of links is less than 2000. Large reports generate errors if the templates are used. — Ivan A. Krestinin (talk) 18:35, 28 June 2020 (UTC)

## KrBot blocked

Hi Ivan A. Krestinin, Hope you noticed that KrBot has been blocked by Ymblanter. Jura1 was requested here to unblock the bot, but Ymblanter suggested to discuss on the project chat, If there is consensus then bot may unblocked. Kindly start a discussion on project chat. Regards, ZI Jony (Talk) 15:20, 14 June 2020 (UTC)

• The main point seems to be P227. I asked users to comment there. If this is resolved or skipped, I'd deblock it. --- Jura 09:10, 20 June 2020 (UTC)

## KrBot reactivated

Hi Ivan, For GND ID (P227), once the discussion here concluded with point d., would you skip the some 1200 entries in the query? Also, VIAF ID (P214), would you wait a few days before this is closed? If so, I don't see why KrBot shouldn't be deblocked. --- Jura 17:36, 27 June 2020 (UTC)

Hi Jura, sorry, I have no time to review all discussions. Am I right? Both GND ID (P227) and VIAF ID (P214) related tasks should be disabled. — Ivan A. Krestinin (talk) 18:13, 28 June 2020 (UTC)
Temporarily yes. Later VIAF could probably continue and GND should skip deprecated items. --- Jura 19:03, 28 June 2020 (UTC)
DoneIvan A. Krestinin (talk) 19:12, 28 June 2020 (UTC)
Я разблокировал бота, спасибо--Ymblanter (talk) 20:07, 28 June 2020 (UTC)
For GND, the following change should be done: deprecated statements should be skipped (not updated or deleted), i.e. option (d) in the discussion. Can you also confirm to @Epìdosis: that for normal/preferred values, it will update redirecting values to the new value and delete deleted values?
Thanks for your patience with this. --- Jura 00:40, 17 July 2020 (UTC)
I join Jura in thanking you for all the great work you have been doing in these years, it is of great help for all of us! Looking forward to seeing again your bot editing also VIAFs and GNDs, --Epìdosis 07:37, 17 July 2020 (UTC)
I need to make significant changes in bot code to ignore deprecated values. But I have too few free time now. Maybe some other bot masters will create bot bot this job. — Ivan A. Krestinin (talk) 22:08, 18 July 2020 (UTC)
For VIAF ignoring deprecated values is not necessary, according to the result of the discussion: could you reactivate only VIAF for now, leaving GND in pause? --Epìdosis 22:31, 18 July 2020 (UTC)
Done for VIAF. — Ivan A. Krestinin (talk) 06:57, 19 July 2020 (UTC)
Can you probably publish the source code? Just implementing a feature is probably easier than creating a bot from scratch. —Tacsipacsi (talk) 23:06, 19 July 2020 (UTC)

## About the recent KrBot edits on Q83

Hi Ivan, not sure how your bot works but I think it needs some further refinement. On page Q83 it added statements and in a second step removed the same statements made by actual editors as duplicate. I guess this is not necessary. Moreover the bot does not consider rank information, i.e. it removed the preferred rank for e.g. 1.34.2 which caused the wrong date being shown (1.31.8) as the most recent preferred release. This is not correct in the end. Anyways thank for trying to make a difference, which is appreciated. Cheers --[[kgh]] (talk) 15:12, 3 July 2020 (UTC)

Bot is no so clever unfortunately.... Our data structure is looked as overcomplicated also (not normalized). What is latest version? It is version with the latest date from usual man point of view. But template uses another logic: it is version with preferred rank. Humans also may make similar errors during version data update. — Ivan A. Krestinin (talk) 22:14, 9 July 2020 (UTC)
> What is latest version? - All versions are released the same day, meaning that all three are the latest version. The version with the preferred rank is the latest version of the latest branch, the others are not. Thus I believe the same logic as for the templates should be applied, moreover so since the templates depend on the preferred label. If there is no preferred label all templates are broken. Probably the bot should back down from such subjects until enough cleverness was added? Cheers --[[kgh]] (talk) 20:39, 16 July 2020 (UTC) PS Humans make errors, too. Admittedly, my own doings over the day are full of them. :)

## Convert external identifier to lower case

Hi! Filmportal ID (P2639) values are UUIDs, with lowercase version being canonical. Is there a way your bot can convert uppercase values (like this one) to lowercase? Preferably using a template on the property talk page instead of hardcoding the rule, so that community has greater control over it by being able to remove the template. {{Autofix}} seems unpractical in this case, as it would require adding ${\displaystyle \sum _{i=0}^{32}{32 \choose i}\cdot 6^{i}}$  possibilities in the regex. The last member of this sum alone is approximately 8×1024 times a 32-character string, which is more than 262 yottabytes, and is quite likely to exceed all limits in MediaWiki (page size limit, template size limit etc.), not to mention how inefficient this would be compared to a search for [A-Z] and applying std::tolower on its characters… —Tacsipacsi (talk) 11:21, 4 July 2020 (UTC)

Now I have only two abilities. Controlled {{Autofix}} and uncontrolled fixes for several properties. I added the property to the second code. — Ivan A. Krestinin (talk) 21:49, 9 July 2020 (UTC)
And would it be possible to create a new template (or an {{Autofix}} parameter) to control upper-/lower-casing? I think it’s a fairly common task, especially for hexadecimal identifiers, as consistent casing helps finding duplicates. Letting the community control the process makes everyone’s life easier and enabling/disabling the fix a lot faster. —Tacsipacsi (talk) 23:32, 9 July 2020 (UTC)
Bot contains custom fix code for 34 properties. Only 2 of its are simple lowercasing. So I think it is too specific case to create separate template. — Ivan A. Krestinin (talk) 06:32, 10 July 2020 (UTC)
This low number actually proves why a template is needed: people don’t reach out to you despite of the potential need for such fixes. Programmers don’t like to talk to other humans, placing a template on the property talk page is much more comfortable. :) With a fairly naïve regex I found over a hundred properties that expect something hexadecimal:
SELECT ?prop ?propLabel ?regex
WHERE {
?prop p:P2302 ?stmt .
?stmt ps:P2302 wd:Q21502404 .
?stmt pq:P1793 ?regex .
FILTER(REGEX(?regex, ".*[Aa]-[Ff].*")) .
FILTER(!REGEX(?regex, ".*(A-Fa-f|a-fA-F).*")) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!Tacsipacsi (talk) 23:03, 10 July 2020 (UTC)
{{autofix|operation=lower_case}}
{{autofix|operation=upper_case}}
Ivan A. Krestinin (talk) 06:14, 14 July 2020 (UTC)

## Autofix P973->P535

I have defined an autofix on Property_talk:P973 which have ~80 to fix.--GZWDer (talk) 00:52, 7 July 2020 (UTC)

The pattern had small mistake. Now everything is fine. — Ivan A. Krestinin (talk) 21:12, 10 July 2020 (UTC)

## Two updations on same date

Please check the history of Wikidata:Database reports/Constraint violations/P2002. In that, an updation is done by DeltaBot and then, the update done by your bot removes it and shows there is an error. Can this be resolved in any way? Adithyak1997 (talk) 15:02, 13 July 2020 (UTC)

Issue related to one-of qualifier value property constraint (Q52712340) is fixed. The next update should be fine. — Ivan A. Krestinin (talk) 22:50, 15 July 2020 (UTC)

## KrBot2 check P3318

Hi:

I'm working on a big upload related with Patrimonio Inmueble de Andalucía ID (P3318) and would be nice to have checking feedback before uploading the big part. I've uploaded about 1000 updates and there are about 21K to be uploaded in the future. Thanks in advance. -- Olea (talk) 16:32, 13 July 2020 (UTC)

Hi, great job! I updated Wikidata:Database reports/Constraint violations/P3318. — Ivan A. Krestinin (talk) 06:48, 14 July 2020 (UTC)
Your bot is really useful. Thanks! Olea (talk) 09:38, 15 July 2020 (UTC)

## Thanks

Hi, thanks for fixing my mistake at Charles Edward Balch (Q97319350). On another item created by me, DeltaBot did the same correction but using just one step instead of two. Your bot could gain some time if it did that, too. Regards, —capmo (talk) 00:56, 14 July 2020 (UTC)

Good idea! Maybe DeltaBot will process all items and my bot will have nothing to do) — Ivan A. Krestinin (talk) 22:52, 15 July 2020 (UTC)

## Incorrect inference

But your inference is incorrect. Virgil (Q1398) has no works in the Philadelphia Museum of Art. The ID indicates that there are works depicting Virgil in the Museum, not works created by Virgil. You will need to re-check all the automatic additions made because you made an incorrect inference about what the ID means. --EncycloPetey (talk) 14:43, 15 July 2020 (UTC)

It looks as though someone modified the identifier constraints incorrectly. All the automatic inferences about works being held in the Museum should be removed. The identifier does not imply that the Museum has works in their collection by that person or organization. --EncycloPetey (talk) 19:36, 15 July 2020 (UTC)

I started rollback process. Thank you for early issue detection. — Ivan A. Krestinin (talk) 23:18, 15 July 2020 (UTC)

Why does your bot keep making this edit? The item (Q63796565) is an item of a person, not a book, and the url is of a book that discusses that person. Gamaliel (talk) 23:49, 16 July 2020 (UTC)

• The use of of the property was incorrect. Help:Sources#Books explains how to add books. --- Jura 00:34, 17 July 2020 (UTC)
• @Gamaliel: You should create an item for the book and use described by source (P1343).--GZWDer (talk) 01:28, 17 July 2020 (UTC)
• That doesn't address the issue at all of the bot using the property incorrectly. Gamaliel (talk) 11:47, 17 July 2020 (UTC)
• I've found a number of other instances of the bot adding Google Books IDs to humans. Gamaliel (talk) 12:38, 17 July 2020 (UTC)
• Just to clarify: the uses of described at URL (P973) are already incorrect. The conversion just makes it easier to detect it. The thing to do is to move the statement to a new item and add details about the work. An other bot can eventually do that. --- Jura 13:36, 17 July 2020 (UTC)
• Making it incorrect in a different way does not make things easier, it makes it even more confusing. It's quite clear what an editor is trying to do when they add a url to "described by URL". Moving that URL to a GoogleBooks ID obscures that. Gamaliel (talk) 13:38, 17 July 2020 (UTC)
• Is there a problem with Help:Sources we should try to fix? --- Jura 13:50, 17 July 2020 (UTC)

## Two times the same value in the same item

Hi! I've noticed that some weeks ago through QuickStatements some values of VIAF ID (P214) and ISNI (P213) have been inserted two times in items. Can you confirm me that your bot will delete them soon? Thank you very much! --Epìdosis 17:09, 24 July 2020 (UTC)

Hello, bot deletes duplicate values, but this may take up to two weeks. — Ivan A. Krestinin (talk) 11:25, 8 August 2020 (UTC)

## Wikidata:Database reports/Constraint violations/P535

On Wikidata:Database reports/Constraint violations/P535, Can you set KrBot2 to format the items as Q templates, rather than wikilinks, such that the labels, and not arbitrary Q-numbers, are visible to humans? This will make identifying, comparing and evaluating items much easier. For instance, comparing Dominguito (Q5812983) and Dominguito Fidel Sarmiento (Q5812984) is easier than Q5812983 and Q5812984. Please consider changing any other database reports that use only wikilinks without labels, as humans, not bots, are the ones who will ultimately perform merges or resolve the constraint violations. Thanks, -Animalparty (talk) 00:46, 1 August 2020 (UTC)

@Animalparty: See #Using item template for constraint reports. —Tacsipacsi (talk) 08:46, 1 August 2020 (UTC)

## Bot problem with P973 & P953

According to this edit, your KrBot seems to be making wrong edits. In the case of paintings, I would imagine to find a copy of the painting in question, along with any archives of it, at the url with a label "full work available at". In this case, there isn't even a black and white copy of the painting available. You will need to re-evaluate the logic you are using for these edits. Jane023 (talk) 11:00, 5 August 2020 (UTC)

## Problem with Q5508224

Hi Ivan! KrBot assigned Q5508224, fullback (position in rugby league football) to numerous Q937857, association football players.

SELECT DISTINCT ?item ?itemLabel ?position ?positionLabel WHERE {
?item wdt:P106 wd:Q937857; # association football player
wdt:P413 ?position.
FILTER(?position = wd:Q5508224)
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}


This is probably due to some inconsitencies in Q5508224 at the time of the changes KrBot made. In the meantime @Mattythewhite: has created the accociation football specific item Q90173132 (full back) which is now clearly separated from Q5508224. I've tried to fix the wrong claims by hand but unfortunately did not succeed because of the large number of items. Therefore my kind question if you could fix the claims using your KrBot. If you decide to do so, please take care with association football players that are also rugby players. Trilemma2 (talk) 14:50, 9 August 2020 (UTC)

Could you place the request to Wikidata:Bot requests. I have too few free time now unfortunately... — Ivan A. Krestinin (talk) 21:25, 10 September 2020 (UTC)

## P973 autofixes not working?

Hi Ivan. It seems they stopped working. --- Jura 06:53, 14 August 2020 (UTC)

Bot is working too hard on DOI (P356)... But this should be finished soon. Sorry for long response... — Ivan A. Krestinin (talk) 20:45, 10 September 2020 (UTC)

## KrBot2

Hello Ivan! KrBot2 shut down on September 3rd and hasn't been updating anything since. Would you check it out? Thank you Palotabarát (talk) 10:34, 14 September 2020 (UTC)

Hi, I had troubles with hardware. Now all should be fine. Please wait day or two. — Ivan A. Krestinin (talk) 20:08, 17 September 2020 (UTC)
OK., thanks! Palotabarát (talk) 22:15, 17 September 2020 (UTC)
It worked for a day :( Stopped on September 18th. Palotabarát (talk) 18:22, 23 September 2020 (UTC)
I fixed one more hardware issue. Now all should be fine. — Ivan A. Krestinin (talk) 19:15, 8 October 2020 (UTC) P. S. Never buy Kingston SSD :)
Thanks so much! (OK: Kingston SSD :) Palotabarát (talk) 23:26, 8 October 2020 (UTC)

## England IS a country

Every time I include the country value England in items your bot changes it to United Kingdom. England IS a country, one of four that make up the United Kingdom. Even the description of England calls it a country. For the demonym Londoners and Kentishmen, the country is BOTH England and United Kingdom. Adam Schiff (talk) 18:42, 15 September 2020 (UTC)

No. At least England can't be used as a value of P17 because it is not independant state. --Infovarius (talk) 14:29, 16 September 2020 (UTC)

## Bot add claim then remove it

Hi! Recently your bot has been editing Scriptores Historiae Augustae (Q9334638), adding a claim before removing it, now five time in a row (since 11 Septembre). Could you fix it? Thanks! --Jahl de Vautban (talk) 07:07, 16 September 2020 (UTC)

Fixed. — Ivan A. Krestinin (talk) 20:15, 17 September 2020 (UTC)

## Bot removing valid VIAF claims

Why is this bot removing completely valid VIAF IDs from records that I added it to? For example, on Q98690908 and Q98700075. I had to add all of them back in. --UWashPrincipalCataloger (talk) 18:27, 19 September 2020 (UTC)

@UWashPrincipalCataloger: Hi! Probably it isn't an error: in the two cases you cite, the IDs where in fact invalid because the initial "1" was missing. I don't know if in other cases the bot was effectively wrong. --Epìdosis 20:27, 19 September 2020 (UTC)
@Epìdosis: Thanks, I must not have noticed that! I usually paste the entire VIAF URL in and a script removes everything but the ID. But I've noticed if I copy just the ID and paste, the first digit is removed. It's a bug of the script I guess, and maybe those IDs were input that way and I didn't notice. Thanks for pointing this out, I'll be more careful! --UWashPrincipalCatalogerdosis 27:27, 19 September 2020 (UTC)

Hi Ivan. Thanks so much for krbot2! I am interested in doing some analysis on the data in the summary table at https://www.wikidata.org/wiki/Wikidata:Database_reports/Constraint_violations/Summary. I need to load the table into Microsoft Excel. Does the bot generate a spreadsheet-loadable format, such as CSV or TSV? If so, is it available anywhere? David L Martin (talk) 00:19, 26 September 2020 (UTC)

Hi David, bot does not generate some machine-readable files currently. But you can copy the page data, paste it to Excel or Open Office Calc and save to CSV. — Ivan A. Krestinin (talk) 19:12, 8 October 2020 (UTC)
Hi Ivan. Thanks for that tip. I had not known about that capability of the spreadsheet products.

## Несуществующая EditGroup

Не могу отменить: [9] --Infovarius (talk) 22:59, 3 October 2020 (UTC)

Приветствую, прошу прощения, что долго не отвечал. Лучше спросить у автора этого инструмента: User talk:Pintoch. Но впрочем в данном конкретном случае проще руками отменить, там всего две правки на одной странице. — Ivan A. Krestinin (talk) 19:06, 8 October 2020 (UTC)

## Изменение свойства

Добрый день! Что думаете по этому поводу? Игорь Темиров (talk) 19:17, 18 October 2020 (UTC)

## Resolving a redirect causes duplicate VIAF

I marked that VIAF as "Deprecated rank" because it contains not only the village in canada, but also a church in france (and at the time I marked it, also a second church in france) and now krbot resolves a redirecting VIAF causing the same VIAF to be contained twice. Please use a different way to resolve such a "conflict", maybe simple drop the redirecting VIAF. Notice: Kolja21. --Wurgl (talk) 10:34, 25 October 2020 (UTC)