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
…ppers
  • Loading branch information
shikha372 committed Jun 10, 2024
1 parent bbe98a5 commit dae8161
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 dae8161

Please sign in to comment.