From 339d24a9e370e2758b7ebf932bee81eef02229c7 Mon Sep 17 00:00:00 2001 From: Almaz <79905215+almazgimaev@users.noreply.github.com> Date: Tue, 22 Aug 2023 12:08:23 +0300 Subject: [PATCH] check if project is not None --- src/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.py b/src/main.py index 25ebbb3..568c99b 100644 --- a/src/main.py +++ b/src/main.py @@ -73,6 +73,8 @@ def download_as_sly(api: sly.Api, task_id, context, state, app_logger): datasets = api.dataset.get_list(PROJECT_ID) dataset_ids = [dataset.id for dataset in datasets] project = api.project.get_info_by_id(PROJECT_ID) + if project is None: + raise Exception(f"Project with ID {PROJECT_ID} not found in your account") if mode == 'all': download_json_plus_images(api, project, dataset_ids) else: