Skip to content

NVR with realtime local object detection for IP cameras

Catch hailo initialization error (#12558)

Nicolas Mowen331c882af2aa
diff --git a/frigate/detectors/plugins/hailo8l.py b/frigate/detectors/plugins/hailo8l.py
index cb797baeb6..a157e240db 100644
--- a/frigate/detectors/plugins/hailo8l.py
+++ b/frigate/detectors/plugins/hailo8l.py
@@ -3,17 +3,22 @@ import os
import urllib.request
import numpy as np
-from hailo_platform import (
- HEF,
- ConfigureParams,
- FormatType,
- HailoRTException,
- HailoStreamInterface,
- InferVStreams,
- InputVStreamParams,
- OutputVStreamParams,
- VDevice,
-)
+
+try:
+ from hailo_platform import (
+ HEF,
+ ConfigureParams,
+ FormatType,
+ HailoRTException,
+ HailoStreamInterface,
+ InferVStreams,
+ InputVStreamParams,
+ OutputVStreamParams,
+ VDevice,
+ )
+except ModuleNotFoundError:
+ pass
+
from pydantic import BaseModel, Field
from typing_extensions import Literal