maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
227 stars 24 forks source link

convert not finding expected item #100

Closed ariutta closed 4 years ago

ariutta commented 5 years ago

When I try to find this protein, given its UniProt protein ID of Q13131, I get the expected response from query: input: wd query -p P352 -o '"Q13131"' response: Q21115170

But convert doesn't seem to be picking it up:

First try

input: wd convert P352 Q13131 response:

{ "Q13131": [] }

Second try

input: wd convert P352 '"Q13131"' response: "Error: Bad Request"

I am using wd version 7.5.4.

ariutta commented 5 years ago

Note that the UniProt protein ID Q13131 is not referring to Wikidata item Q13131.

maxlath commented 5 years ago

sorry for the late answer, I missed the notification. The problem is that the protein id is interpreted as a Wikidata id. The right fix would probably be to check the property datatype instead of guessing it from the passed values