Skip to content

Commit 2064306

Browse files
authored
fix: AttributeError: module 'pydantic.v1' has no attribute 'error_wrapper' (#3611)
1 parent f355068 commit 2064306

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

samtranslator/model/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ def validate_properties_and_return_model(self, cls: Type[RT]) -> RT:
350350
with suppress(KeyError):
351351
error_properties = ".".join(str(x) for x in e.errors()[0]["loc"])
352352
raise InvalidResourceException(self.logical_id, f"Property '{error_properties}' is invalid.") from e
353+
except AttributeError as e:
354+
raise InvalidResourceException(
355+
self.logical_id, "Module 'pydantic.v1' has no attribute 'error_wrappers'"
356+
) from e
353357

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

0 commit comments

Comments
 (0)