nextstrain / fauna

RethinkDB database to support real-time virus analysis
GNU Affero General Public License v3.0
33 stars 13 forks source link

TDB upload fails if subtype is absent #51

Closed trvrb closed 7 years ago

trvrb commented 7 years ago

Calling:

python tdb/cdc_upload.py -db cdc_fra_tdb -v flu --path data/ --fstem FRA_Sep2015_Sep2016_titers --ftype flat --preview

Errors out to:

Traceback (most recent call last):
  File "tdb/cdc_upload.py", line 105, in <module>
    connTDB = cdc_upload(**args.__dict__)
  File "tdb/cdc_upload.py", line 14, in __init__
    upload.__init__(self, **kwargs)
  File "/Users/trvrb/Documents/src/fauna/tdb/upload.py", line 32, in __init__
    self.subtype = subtype.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

an empty subtype should not bomb out. Empty subtype should collect subtype from within the flat file.