When I am making api calls and there is a "connection reset by peer" the library code continues to execute, resulting in a non-informative error from inside the library. The error 'NoneType' object is not subscriptable
is underspecified, making error handling very difficult.
Traceback (most recent call last):
File "/Users/philiprobinson/git/sar-processor/pkg/gfwsar/eodms/rcm/meta/_api.py", line 212, in <module>
test()
File "/Users/philiprobinson/git/sar-processor/pkg/gfwsar/eodms/rcm/meta/_api.py", line 206, in test
filepath = run(gc, first, last, destination)
File "/Users/philiprobinson/git/sar-processor/pkg/gfwsar/eodms/rcm/meta/_api.py", line 140, in run
paths = gather_data_csvs(gc, first, last, destination)
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/retrying.py", line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/retrying.py", line 206, in call
return attempt.get(self._wrap_exception)
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/retrying.py", line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/six.py", line 719, in reraise
raise value
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/retrying.py", line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "/Users/philiprobinson/git/sar-processor/pkg/gfwsar/eodms/rcm/meta/_api.py", line 116, in gather_data_csvs
raw = gather_raw(api, start, end)
File "/Users/philiprobinson/git/sar-processor/pkg/gfwsar/eodms/rcm/meta/_api.py", line 53, in gather_raw
api.search(
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/eodms_rapi/eodms.py", line 2813, in search
params['query'] = self._parse_query(filters, features, dates)
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/eodms_rapi/eodms.py", line 910, in _parse_query
field_id = self._get_field_id('Acquisition Start Date')
File "/Users/philiprobinson/git/sar-processor/venv/lib/python3.9/site-packages/eodms_rapi/eodms.py", line 619, in _get_field_id
fields = self.get_available_fields(name_type='all')[field_type]
TypeError: 'NoneType' object is not subscriptable