summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-20 21:23:29 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-09-20 21:23:29 -0700
commitc9779cf47d9891a5beb703201cd1bc4c51d423ea (patch)
treeef39282721a678fce427d777c992c2c03efda3c6
parent94db8166c0addc663ec9e8c3d20b123f6154ea66 (diff)
downloadfatcat-c9779cf47d9891a5beb703201cd1bc4c51d423ea.tar.gz
fatcat-c9779cf47d9891a5beb703201cd1bc4c51d423ea.zip
fix issues with extid mapping in crossref-importer
-rw-r--r--python/fatcat/crossref_importer.py2
-rwxr-xr-xpython/fatcat_import.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/python/fatcat/crossref_importer.py b/python/fatcat/crossref_importer.py
index 768686fc..3c6ba3ef 100644
--- a/python/fatcat/crossref_importer.py
+++ b/python/fatcat/crossref_importer.py
@@ -27,7 +27,7 @@ class FatcatCrossrefImporter(FatcatImporter):
[doi.lower()]).fetchone()
if row is None:
return dict(core_id=None, pmid=None, pmcid=None, wikidata_qid=None)
- row = [str((cell or None)) for cell in row]
+ row = [str(cell or '') or None for cell in row]
return dict(
core_id=row[0],
pmid=row[1],
diff --git a/python/fatcat_import.py b/python/fatcat_import.py
index bf0a32ad..c799dcd3 100755
--- a/python/fatcat_import.py
+++ b/python/fatcat_import.py
@@ -54,7 +54,7 @@ def main():
default=None, type=argparse.FileType('r'))
sub_import_crossref.add_argument('extid_map_file',
help="DOI-to-other-identifiers sqlite3 database",
- default=None, type=argparse.FileType('r'))
+ default=None, type=str)
sub_import_crossref.add_argument('--no-create-containers',
action='store_true',
help="skip creation of new container entities based on ISSN")