From aa786e1b41841604e00a451d7304cdcfc6795e2c Mon Sep 17 00:00:00 2001 From: Chris Cheney Date: Sat, 8 Apr 2023 21:30:36 -0500 Subject: [PATCH] command_name null check before calling .lower() fixes #534 `AttributeError: 'NoneType' object has no attribute 'lower'` --- scripts/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.py b/scripts/main.py index 17385bf33..4d68b4506 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -358,7 +358,7 @@ while True: f"COMMAND = {Fore.CYAN}{command_name}{Style.RESET_ALL} ARGUMENTS = {Fore.CYAN}{arguments}{Style.RESET_ALL}") # Execute command - if command_name.lower() == "error": + if command_name is not None and command_name.lower() == "error": result = f"Command {command_name} threw the following error: " + arguments elif command_name == "human_feedback": result = f"Human feedback: {user_input}"