From 69ca9079a83902e312157937306644f873737806 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 21 Jul 2020 13:50:02 -0700 Subject: load issue rows: handle empty metadata --- fatcat_scholar/issue_db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fatcat_scholar/issue_db.py b/fatcat_scholar/issue_db.py index 6769055..ba88d07 100644 --- a/fatcat_scholar/issue_db.py +++ b/fatcat_scholar/issue_db.py @@ -286,6 +286,8 @@ class IssueDB: if not line: continue obj = json.loads(line) + if not "metadata" in obj: + continue meta = obj["metadata"] assert "periodicals" in meta["collection"] # pub_collection = [c for c in meta['collection'] if c.startswith("pub_")][0] -- cgit v1.2.3