@@ -477,8 +477,9 @@ def validate_collections(self) -> None:
477477
478478 Raises:
479479 URLError, JSONDecodeError, ValueError, TypeError, FileNotFoundError,
480- ConnectionError, exceptions.SSLError, OSError: Various errors related
481- to fetching or parsing.
480+ ConnectionError, exceptions.SSLError, OSError, KeyError, HTTPError,
481+ jsonschema.exceptions.ValidationError, Exception: Various errors
482+ during fetching or parsing.
482483 """
483484 collections = fetch_and_parse_file (str (self .stac_file ), self .headers )
484485 for collection in collections ["collections" ]:
@@ -491,8 +492,9 @@ def validate_item_collection(self) -> None:
491492
492493 Raises:
493494 URLError, JSONDecodeError, ValueError, TypeError, FileNotFoundError,
494- ConnectionError, exceptions.SSLError, OSError: Various errors related
495- to fetching or parsing.
495+ ConnectionError, exceptions.SSLError, OSError, KeyError, HTTPError,
496+ jsonschema.exceptions.ValidationError, Exception: Various errors
497+ during fetching or parsing.
496498 """
497499 page = 1
498500 print (f"processing page { page } " )
@@ -558,7 +560,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
558560
559561 item_model = Item .model_validate (self .stac_content )
560562 message ["schema" ] = ["stac-pydantic Item model" ]
561- print ("Set schema to: " + message ["schema" ])
563+ print ("Set schema to: " + str ( message ["schema" ]) )
562564
563565 # Validate extensions if present
564566 if (
@@ -577,7 +579,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
577579
578580 collection_model = Collection .model_validate (self .stac_content )
579581 message ["schema" ] = ["stac-pydantic Collection model" ]
580- print ("Set schema to: " + message ["schema" ])
582+ print ("Set schema to: " + str ( message ["schema" ]) )
581583
582584 # Validate extensions if present
583585 if (
@@ -596,7 +598,7 @@ def pydantic_validator(self, stac_type: str) -> Dict:
596598
597599 catalog_model = Catalog .model_validate (self .stac_content )
598600 message ["schema" ] = ["stac-pydantic Catalog model" ]
599- print ("Set schema to: " + message ["schema" ])
601+ print ("Set schema to: " + str ( message ["schema" ]) )
600602
601603 # For catalogs, we don't need to validate extensions, but we still need to use the model
602604 # to avoid flake8 warnings
0 commit comments