From fd4ef490c7a20e1c669058723e9f34020d9687d2 Mon Sep 17 00:00:00 2001 From: Arnaud_Cayrol Date: Sat, 12 Apr 2025 16:24:05 +0200 Subject: [PATCH] Fix syntax error --- timelapse.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/timelapse.py b/timelapse.py index 279faa2..a1cdc80 100644 --- a/timelapse.py +++ b/timelapse.py @@ -116,9 +116,11 @@ def validate_immich_connection(api_key, base_url): return False, f"Unexpected error: {str(e)}" -def initialize_worker(landmark_model_path): - """ - Initializes the face predictor in each worker process. +def initialize_worker(landmark_model_path: str) -> None: + """Initialize worker process with face predictor. + + Args: + landmark_model_path: Path to the landmark model file """ global face_predictor face_predictor = dlib.shape_predictor(landmark_model_path) @@ -558,7 +560,7 @@ def process_faces(config: AppConfig, max_workers=1, progress_callback=None, canc processed_files = [] completed_count = 0 - initializer_args = (config.landmark_model) + initializer_args = [config.landmark_model] with concurrent.futures.ProcessPoolExecutor( max_workers=max_workers, initializer=initialize_worker,