You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
Currently, if you perform a search and a catalog does not contain any features, you'll see this:
[ERROR] KeyError: 'features'
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 47, in lambda_handler
catalogs.append(Catalog(cat, update=True))
File "/var/task/cirruslib/catalog.py", line 48, in __init__
self.update()
File "/var/task/cirruslib/catalog.py", line 108, in update
cols = sorted(list(set([i['collection'] for i in self['features'] if 'collection' in i])))
This looks like an error, but it did not fail - there were no features in the FeatureCollection.
It'd be nice if we could handle this exception with a prettier message for developer experience.
Currently, if you perform a search and a catalog does not contain any features, you'll see this:
This looks like an error, but it did not fail - there were no
features
in theFeatureCollection
.It'd be nice if we could handle this exception with a prettier message for developer experience.
I'm actually not sure how it's passing this assert line: https://github.com/cirrus-geo/cirrus-lib/blob/main/cirruslib/catalog.py#L62 but I will play around with it and report back in this issue.
The text was updated successfully, but these errors were encountered: