From d014a3412e06fabc560bed11ed04e41da5364ece Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 6 May 2026 09:26:31 -0500 Subject: [PATCH] fix mypy --- frigate/genai/ollama.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/genai/ollama.py b/frigate/genai/ollama.py index 6d4931466..bc3445961 100644 --- a/frigate/genai/ollama.py +++ b/frigate/genai/ollama.py @@ -1,6 +1,7 @@ """Ollama Provider for Frigate AI.""" import base64 +import binascii import json import logging from typing import Any, AsyncGenerator, Optional @@ -46,7 +47,7 @@ def _normalize_multimodal_content( try: encoded = url.split(",", 1)[1] images.append(base64.b64decode(encoded, validate=True)) - except (ValueError, IndexError, base64.binascii.Error) as e: + except (ValueError, IndexError, binascii.Error) as e: logger.debug("Failed to decode multimodal image url: %s", e) return ("\n".join(text_parts) if text_parts else None), (images or None)