Skip to content

Commit

Permalink
fix: AttributeError: module 'pydantic.v1' has no attribute 'error_wra…
Browse files Browse the repository at this point in the history
…pper' (#3611)
  • Loading branch information
shikha372 authored Jun 13, 2024
1 parent f355068 commit 2064306
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions samtranslator/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ def validate_properties_and_return_model(self, cls: Type[RT]) -> RT:
with suppress(KeyError):
error_properties = ".".join(str(x) for x in e.errors()[0]["loc"])
raise InvalidResourceException(self.logical_id, f"Property '{error_properties}' is invalid.") from e
except AttributeError as e:
raise InvalidResourceException(
self.logical_id, "Module 'pydantic.v1' has no attribute 'error_wrappers'"
) from e

def validate_properties(self) -> None:
"""Validates that the required properties for this Resource have been populated, and that all properties have
Expand Down

0 comments on commit 2064306

Please sign in to comment.