From 348562565a9b214271424d5360960c154691892b Mon Sep 17 00:00:00 2001 From: fanxing333 <41065862+fanxing333@users.noreply.github.com> Date: Thu, 12 Dec 2024 04:17:02 +0800 Subject: [PATCH] Fix raw length check condition (#262) --- kaggle_environments/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kaggle_environments/agent.py b/kaggle_environments/agent.py index 194901ab..57c93ef0 100644 --- a/kaggle_environments/agent.py +++ b/kaggle_environments/agent.py @@ -123,7 +123,7 @@ def build_agent(raw, builtin_agents, environment_name): raw_agent = raw if os.path.exists(raw): raw_agent = read_file(raw, raw) - elif (len(raw) < 100 and ("/" in raw or "\\" in raw)) or raw < 20: + elif (len(raw) < 100 and ("/" in raw or "\\" in raw)) or len(raw) < 20: raise FileNotFoundError("Could not find : " + raw) # Attempt to execute the last callable or just return the string.