For example, if a zipcode is not found, lat and lng should individually be set to None, rather than failing because of a TypeError: 'NoneType' object is not iterable that is raised when zipcode_to_lat_lng returns None.
I'm still not exactly convinced how this should be handled, but for now, I'm handling it by returning None,None instead of None, which generates the type error.
For example, if a zipcode is not found, lat and lng should individually be set to
None
, rather than failing because of aTypeError: 'NoneType' object is not iterable
that is raised when zipcode_to_lat_lng returnsNone
.https://github.com/impactlab/eemeter/blob/83f6c466c79cc1e791c121c569846b53969a7879/eemeter/location.py#L289-L299