Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on entities with too recent properties #28

Closed
ghost opened this issue Oct 5, 2017 · 2 comments
Closed

Fails on entities with too recent properties #28

ghost opened this issue Oct 5, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 5, 2017

wikidata-cli fails when reading/writing entities containing very recent properties.
i.e:

$ wd claims Q41610011
TypeError: Cannot read property 'type' of undefined
    at BuildClaimsText (/usr/lib/node_modules/wikidata-cli/lib/log_claims.js:43:39)
    at Promise.all.then.results (/usr/lib/node_modules/wikidata-cli/lib/log_claims.js:22:28)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

It fails because of the P4276, created yesterday.

The property is not in the known props list:

$ wd p
[…]
  "P4241": null,
  "P4242": "vitesse ascensionnelle (maximale)",
  "P4243": null
}

I'm not sure it's an outdated server cache, or a runtime local info that is has to be updated.
Is there a workaround?

maxlath added a commit that referenced this issue Oct 5, 2017
@maxlath
Copy link
Owner

maxlath commented Oct 5, 2017

it happens when the local properties list is outdated, it can be fixed by running ẁd props --reset, I replaced the error message you got by that advice: 03f1205

@ghost
Copy link
Author

ghost commented Oct 5, 2017

$ wd claims Q41610011
the property P4276 could not be found
run `wd props --reset` to refresh the local properties list

Way much clearer!

Thank you for the hint and the patch, Maxime.

@ghost ghost closed this as completed Oct 5, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant