Closed rwst closed 3 years ago
Note the documentation says only the new value is needed. I tried with old and new value. First simple format:
ralf@ark:~/wikidata> wd uc -b -v <tt
edit group: https://tools.wmflabs.org/editgroups/b/wikibase-cli/a6a5371ff938a/
processing line 1: Q417654$8A1313EA-74EE-4ED5-A7ED-90C8AAE09762 1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+ InChi=1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+
invalid monolingualtext value { property: 'P1476', value: 'triprolidine' }
Note the statement is P234 not P1476. The other format:
ralf@ark:~/wikidata> wd uc -b -v <tt
edit group: https://tools.wmflabs.org/editgroups/b/wikibase-cli/d18a28a291187/
processing line 1: { "guid": "Q417654$8A1313EA-74EE-4ED5-A7ED-90C8AAE09762", "oldValue": "1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+", "newValue": "InChi=1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+" }
old and new claim values can't be the same { oldValue: undefined, newValue: undefined }
Actually, because of P1476 seems related to #128 . But note P1476 is not used by these items, at all.
which version of wikibase-cli
are you using?
The P1476 comes from the reference (which apparently gets rewritten)!
ralf@ark:~/wikidata> wd --version
12.0.3
Confirmed this happens with 15.2.1 too.
ralf@ark:~/wikidata> wd uc -b -v <tt
edit group: https://tools.wmflabs.org/editgroups/b/wikibase-cli/5faa7b628caa6/
processing line 1: Q202998$2723F6CE-99EF-4673-A132-3418B04BA799 1S/C11H12N2O2S/c1-7(13(15)11(12)14)10-6-8-4-2-3-5-9(8)16-10/h2-7,15H,1H3,(H2,12,14) InChi=1S/C11H12N2O2S/c1-7(13(15)11(12)14)10-6-8-4-2-3-5-9(8)16-10/h2-7,15H,1H3,(H2,12,14)
invalid monolingualtext value { property: 'P1476', value: 'ZILEUTON' }
I confirm uc batch works on items that don't have P1476 but only when I give four arguments: guid property oldValue newValue which needs to be changed in the documentation.
No sorry that's wrong. The two arguments work fine, as in docs. All the problems come from P1476.
There were 2 problems here:
Both problems have now been patched and published in v15.2.2
, and I was able to do the edit you provided
It works. Many thanks!
With
{"guid":"Q417654$8a1313ea-74ee-4ed5-a7ed-90c8aae09762","newValue":"InChi=1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+"}
intmp
andwd uc -b <tmp
I get:A similar attempt with the line
Q417654$8A1313EA-74EE-4ED5-A7ED-90C8AAE09762 InChi=1S/C19H22N2/c1-16-7-9-17(10-8-16)18(19-6-2-3-12-20-19)11-15-21-13-4-5-14-21/h2-3,6-12H,4-5,13-15H2,1H3/b18-11+
givesThe format is the same as in the documentation so I'm quite surprised. Is batch uc possible at all?