diff --git a/nm_iconfinder/nm_iconfinder.py b/nm_iconfinder/nm_iconfinder.py index b4c8dbe..9602009 100644 --- a/nm_iconfinder/nm_iconfinder.py +++ b/nm_iconfinder/nm_iconfinder.py @@ -42,7 +42,7 @@ def from_url(cls, url: str) -> Optional["Icon"]: with BytesIO(res.content) as bio: try: img = Image.open(bio) - except UnidentifiedImageError: + except (UnidentifiedImageError, ValueError): return None width, height = img.size # Ignore non-square Icons