diff --git a/onvif/client.py b/onvif/client.py index f479c4d..093d732 100644 --- a/onvif/client.py +++ b/onvif/client.py @@ -543,7 +543,9 @@ async def get_snapshot_uri(self, profile_token: str) -> str: else: try: uri = normalize_url(result.Uri) - except KeyError: + except (AttributeError, KeyError): + # AttributeError is raised when result.Uri is missing + # https://github.com/home-assistant/core/issues/135494 logger.warning( "%s: The device returned an invalid snapshot URI", self.host )