Closed eloiferrer closed 3 months ago
The error is caused due to the 'entity-schema' datatype not being recognized by wikibaseintegrator.
As a hack before we find a more permanent solution, just edit:
/usr/local/lib/python3.11/site-packages/wikibaseintegrator/models/claims.py
in line 128 to contain this:
if 'datatype' in claim['mainsnak']:
if claim['mainsnak']['datatype'] == 'entity-schema':
data_type = BaseDataType
else:
data_type = [x for x in BaseDataType.subclasses if x.DTYPE == claim['mainsnak']['datatype']][0]
instead of just
if 'datatype' in claim['mainsnak']:
data_type = [x for x in BaseDataType.subclasses if x.DTYPE == claim['mainsnak']['datatype']][0]
This has been fixed with https://github.com/MaRDI4NFDI/docker-importer/commit/d366d50250c56b8969d19799320f7df8ed89385a and the latest release of WikibaseIntegrator.
Describe the bug The wikidata importer (import_entitites function) fails when importing some specific items. For instance, the item Software (Q7397) cannot be imported.
Expected behavior The items should be imported without errors.
To Reproduce Steps to reproduce the behavior:
Screenshots (If applicable, add screenshots to help explain your problem.)
Additional context Add any other context about the problem here.
Checklist for this issue: (Some checks for making sure this issue is completely formulated)