Skip to content

Commit

Permalink
check if project is not None
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev authored Aug 22, 2023
1 parent 669e73d commit 339d24a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 339d24a

Please sign in to comment.