diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-09-20 21:23:29 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-09-20 21:23:29 -0700 |
commit | c9779cf47d9891a5beb703201cd1bc4c51d423ea (patch) | |
tree | ef39282721a678fce427d777c992c2c03efda3c6 | |
parent | 94db8166c0addc663ec9e8c3d20b123f6154ea66 (diff) | |
download | fatcat-c9779cf47d9891a5beb703201cd1bc4c51d423ea.tar.gz fatcat-c9779cf47d9891a5beb703201cd1bc4c51d423ea.zip |
fix issues with extid mapping in crossref-importer
-rw-r--r-- | python/fatcat/crossref_importer.py | 2 | ||||
-rwxr-xr-x | 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") |