maxlath / wikibase-dump-filter

Filter and format a newline-delimited JSON stream of Wikibase entities
98 stars 15 forks source link

TypeError: entity-schema claim parser isn't implemented #43

Closed Yajha closed 2 weeks ago

Yajha commented 2 weeks ago

Hi , found a problem when using --simplify .

Reproduction: cat latest-all.json.gz | gzip -d | wikibase-dump-filter --simplify > simplified_wikidata.ndjson

Error: modules/wikibase-sdk/lib/helpers/parse_claim.js:116 throw err ^

TypeError: entity-schema claim parser isn't implemented Claim id: Q8502$ccf20476-492b-da1f-a726-fb29f295bc69 Please report to https://github.com/maxlath/wikibase-sdk/issues at parse (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/parse_claim.js:109:31) at simplifyClaim (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_claims.js:79:13) at /usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_claims.js:37:19 at Array.map () at simplifyPropertyClaims (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_claims.js:37:6) at Object.simplifyClaims (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_claims.js:15:24) at simplifyIfDefined (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_entity.js:39:48) at simplifyEntity (/usr/local/lib/node_modules/wikibase-dump-filter/node_modules/wikibase-sdk/lib/helpers/simplify_entity.js:17:5) at /usr/local/lib/node_modules/wikibase-dump-filter/lib/format_entity.js:31:16 at /usr/local/lib/node_modules/wikibase-dump-filter/lib/filter_format_and_serialize_entity.js:18:30

just wonder what causes this problem. Thanks for your time.

maxlath commented 2 weeks ago

Ah yes, support for the new entity-schema type was missing; that should now be fixed in v6.0.0, after having updated wikibase-sdk > v10.1.0. I would assume this is fixed, but you are welcome to re-open the issue if it isn't.