From c9779cf47d9891a5beb703201cd1bc4c51d423ea Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 20 Sep 2018 21:23:29 -0700 Subject: fix issues with extid mapping in crossref-importer --- python/fatcat/crossref_importer.py | 2 +- python/fatcat_import.py | 2 +- 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") -- cgit v1.2.3