summaryrefslogtreecommitdiff
path: root/megapixels/commands/datasets/citations_to_csv.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-02-16 16:09:48 +0100
committerJules Laplace <julescarbon@gmail.com>2019-02-16 16:09:48 +0100
commitfd1dff17a90afdd2478a98856ee3ad509c5c4900 (patch)
tree36c259aca509bf84783c810fd4b1c490b602a464 /megapixels/commands/datasets/citations_to_csv.py
parentb8811569b5c3962695c91befdbed0d75fb490ebe (diff)
store many pdfs
Diffstat (limited to 'megapixels/commands/datasets/citations_to_csv.py')
-rw-r--r--megapixels/commands/datasets/citations_to_csv.py4
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