-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
I get the following exception trace when trying to run the validator (v0.6.2) with --conformance browseable
:
INFO:stac_api_validator.validations:Validating STAC API - Browseable conformance class.
Failed.
Error http://127.0.0.1:8000/api/zipped: <class 'AttributeError'> 'Item' object has no attribute 'collection' Traceback (most recent call last):
File "/Users/leo/.pyenv/versions/test/lib/python3.10/site-packages/stac_api_validator/__main__.py", line 163, in main
(warnings, errors) = validate_api(
File "/Users/leo/.pyenv/versions/test/lib/python3.10/site-packages/stac_api_validator/validations.py", line 579, in validate_api
validate_browseable(landing_page_body, errors, warnings, r_session)
File "/Users/leo/.pyenv/versions/test/lib/python3.10/site-packages/stac_api_validator/validations.py", line 849, in validate_browseable
params={"ids": item.id, "collections": item.collection},
AttributeError: 'Item' object has no attribute 'collection'
The item
in Line 849 of validations.py is the result from a call to pystac's (v1.10.1) Catalog.from_dict(root_body).get_all_items()
. However:
get_all_items()
is now deprecated according to https://pystac.readthedocs.io/en/stable/_modules/pystac/catalog.html#Catalog.get_all_items- I can verify separately that items returned from that call indeed do not contain a
collection
field, just acollection_id
field.
If I patch line 849 to use collection_id
my API validates perfectly fine.
Is this indeed an issue in the validator, or am I missing something?
Regards,
-- Leo
Metadata
Metadata
Assignees
Labels
No labels