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
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:
@LeoBreebaart thanks for the report -- I think this is actually a bug in pystac, and have opened up a fix here: stac-utils/pystac#1400. Once that's merged and released, we'll update that dependency on this repo.
In the meantime, if you wanted to patch your environment to (hopefully) work now, you could:
I get the following exception trace when trying to run the validator (v0.6.2) with
--conformance browseable
: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_itemscollection
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
The text was updated successfully, but these errors were encountered: