Skip to content

Commit

Permalink
Fix wrong error message. (#1379)
Browse files Browse the repository at this point in the history
Closes #1342

Co-authored-by: Vladimir Iglovikov <ternaus@users.noreply.github.com>
  • Loading branch information
Dipet and ternaus committed Feb 12, 2023
1 parent 1eceb79 commit 6543733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion albumentations/core/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def _check_args(self, **kwargs) -> None:
if self.is_check_shapes and shapes and shapes.count(shapes[0]) != len(shapes):
raise ValueError(
"Height and Width of image, mask or masks should be equal. You can disable shapes check "
"by calling disable_shapes_check method of Compose class (do it only if you are sure "
"by setting a parameter is_check_shapes=False of Compose class (do it only if you are sure "
"about your data consistency)."
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def test_compose_image_mask_equal_size(targets):

assert str(exc_info.value).startswith(
"Height and Width of image, mask or masks should be equal. "
"You can disable shapes check by calling disable_shapes_check method "
"You can disable shapes check by setting a parameter is_check_shapes=False "
"of Compose class (do it only if you are sure about your data consistency)."
)
# test after disabling shapes check
Expand Down

0 comments on commit 6543733

Please sign in to comment.