From fd1dff17a90afdd2478a98856ee3ad509c5c4900 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 16 Feb 2019 16:09:48 +0100 Subject: store many pdfs --- megapixels/commands/datasets/citations_to_csv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'megapixels/commands/datasets/citations_to_csv.py') diff --git a/megapixels/commands/datasets/citations_to_csv.py b/megapixels/commands/datasets/citations_to_csv.py index e54d0dac..253d15fc 100644 --- a/megapixels/commands/datasets/citations_to_csv.py +++ b/megapixels/commands/datasets/citations_to_csv.py @@ -94,6 +94,8 @@ def get_orig_paper(json_data): addresses = p.get('address','') if addresses: for a in addresses: + if type(a) == str or a is None: + continue paper = Paper(p['key'], p['name'], p['paper_id'], p['title'], d_type, year, p['pdf'], a['address'], a['type'], a['lat'], a['lng']) @@ -101,4 +103,4 @@ def get_orig_paper(json_data): else: paper = Paper(p['key'], p['name'], p['paper_id'], p['title'], d_type, year, p['pdf']) papers.append(paper) - return papers \ No newline at end of file + return papers -- cgit v1.2.3-70-g09d2