From b24ed1937cf8a685f929aef5ac0625449d29cb69 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 7 Jul 2022 23:46:44 +0300 Subject: [PATCH] Fix `KeyError` when running remotely and no params were passed to click (https://github.com/allegroai/clearml-agent/issues/111) --- clearml/binding/click_bind.py | 2 ++ clearml/utilities/files.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/clearml/binding/click_bind.py b/clearml/binding/click_bind.py index 0fb55af4..6d551905 100644 --- a/clearml/binding/click_bind.py +++ b/clearml/binding/click_bind.py @@ -148,6 +148,8 @@ class PatchClick: } params = PatchClick.__remote_task_params + if not params: + return None command = [ p.name for p in params['Args'].values() if p.type == PatchClick._command_type and cast_str_to_bool(p.value, strip=True)] diff --git a/clearml/utilities/files.py b/clearml/utilities/files.py index 0b02c0e3..15c21053 100644 --- a/clearml/utilities/files.py +++ b/clearml/utilities/files.py @@ -20,4 +20,3 @@ def get_filename_max_length(dir_path): print(err) return 255 # Common filesystems like NTFS, EXT4 and HFS+ limited with 255 -