ayota / ddl_nlp

Repo for DDL research lab project.
2 stars 1 forks source link

Bugfix for medical abstract ingestion with illegal variable reference #48

Closed lauralorenz closed 7 years ago

lauralorenz commented 8 years ago
2016-08-18 00:38:52,978: INFO : Fetched Myopathy term wiki artifacts.
2016-08-18 00:38:53,952: INFO : Document does not have abstract.
Traceback (most recent call last):
  File "fun_3000/get_corpus.py", line 84, in <module>
    fetch_corpus(search_terms, directory, results)
  File "fun_3000/get_corpus.py", line 41, in fetch_corpus
    med_search.get_medical_abstracts(term, data_dir, results)
  File "/home/laura/ddl_nlp/fun_3000/ingestion/med_abstract_ingest.py", line 172, in get_medical_abstracts
    abstracts_pubmed = fetch_pubmed(search_term, results)
  File "/home/laura/ddl_nlp/fun_3000/ingestion/med_abstract_ingest.py", line 64, in fetch_pubmed
    for item in summary:
UnboundLocalError: local variable 'summary' referenced before assignment

Looks like this here belongs in the try/except.