aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/fatcat_tools/importers/datacite.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index f005f988..785107ee 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -732,6 +732,10 @@ class DataciteImporter(EntityImporter):
if nameType in ('', 'Personal'):
creator_id = None
for nid in c.get('nameIdentifiers', []) or []:
+ if not isinstance(nid, dict):
+ # see: fatcat-workers/issues/44035/
+ print('unexpected nameIdentifiers, expected list of dicts, got: {}'.format(nid), file=sys.stderr)
+ continue
name_scheme = nid.get('nameIdentifierScheme', '') or ''
if not name_scheme.lower() == "orcid":
continue