ralf@ark:~/wikidata> echo 'Q57971954' |wd data --props labels.en --simplify
TypeError: Cannot read property 'value' of null
at /usr/lib/node_modules/wikibase-cli/node_modules/wikibase-sdk/lib/helpers/simplify_text_attributes.js:7:54
at Array.reduce (<anonymous>)
at Object.data (/usr/lib/node_modules/wikibase-cli/node_modules/wikibase-sdk/lib/helpers/simplify_text_attributes.js:2:28)
at simplifyIfDefined (/usr/lib/node_modules/wikibase-cli/node_modules/wikibase-sdk/lib/helpers/simplify_entity.js:39:48)
at Object.simplifyEntity [as entity] (/usr/lib/node_modules/wikibase-cli/node_modules/wikibase-sdk/lib/helpers/simplify_entity.js:14:5)
at entities.map.entity (/usr/lib/node_modules/wikibase-cli/lib/fetch_and_log_ids_data.js:22:50)
at Array.map (<anonymous>)
at onResponse (/usr/lib/node_modules/wikibase-cli/lib/fetch_and_log_ids_data.js:22:27)
at getNextBatch (/usr/lib/node_modules/wikibase-cli/lib/get_entities_by_batches.js:28:5)
at process._tickCallback (internal/process/next_tick.js:68:7)
Context: undefined
Of course if this is the only label requested then it can be handled. But I encountered the error with a batch of 1.8k items that I requested. I would expect to just get an empty label instead of an error. And indeed:
ralf@ark:~/wikidata> echo 'Q57971954' |wd data --props labels.en
{"type":"item","id":"Q57971954","labels":{"en":null}}
Of course if this is the only label requested then it can be handled. But I encountered the error with a batch of 1.8k items that I requested. I would expect to just get an empty label instead of an error. And indeed: