diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-02-16 16:09:48 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-02-16 16:09:48 +0100 |
| commit | fd1dff17a90afdd2478a98856ee3ad509c5c4900 (patch) | |
| tree | 36c259aca509bf84783c810fd4b1c490b602a464 /megapixels/commands/datasets/citations_to_csv.py | |
| parent | b8811569b5c3962695c91befdbed0d75fb490ebe (diff) | |
store many pdfs
Diffstat (limited to 'megapixels/commands/datasets/citations_to_csv.py')
| -rw-r--r-- | megapixels/commands/datasets/citations_to_csv.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |
