From ed9947af432adcd9591f12d9fd36fe2139092c7f Mon Sep 17 00:00:00 2001 From: cxnt Date: Fri, 6 Oct 2023 17:30:49 +0400 Subject: [PATCH] add try except for log tree --- src/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 2018953..716b309 100644 --- a/src/main.py +++ b/src/main.py @@ -67,7 +67,10 @@ def export_to_coco(api: sly.Api, task_id, context, state, app_logger): sly.logger.info(f"Dataset [{dataset.name}] processed!") - sly.fs.log_tree(g.storage_dir, sly.logger, level="info") + try: + sly.fs.log_tree(g.storage_dir, sly.logger, level="info") + except: + sly.logger.warn("Can not log storage tree") full_archive_name = f"{task_id}_{g.project.name}.tar" result_archive = os.path.join(g.my_app.data_dir, full_archive_name)