[autosubmit 4] Running autosubmit with no extra command results in "Trace: 'NoneType' object has no attribute 'upper'"
After syncing the branch this morning, I tested the autosubmit with no args or sub-commands. I expected a list of possible sub-commands, or some usage message. Instead the command failed and printed the following:
(venv) kinow@ranma:~/Development/python/workspace/autosubmit$ autosubmit configure
Writing configuration file...
Configuration file written successfully:
/home/kinow/.autosubmitrc
Directories configured successfully:
/home/kinow/autosubmit
/home/kinow/autosubmit
/home/kinow/autosubmit/logs
/home/kinow/autosubmit/metadata/structures
/home/kinow/autosubmit/metadata/data
/home/kinow/autosubmit/metadata/logs
(venv) kinow@ranma:~/Development/python/workspace/autosubmit$ autosubmit install
Creating autosubmit database...
Autosubmit database created successfully
(venv) kinow@ranma:~/Development/python/workspace/autosubmit$ autosubmit
[ERROR] Trace: 'NoneType' object has no attribute 'upper'
[CRITICAL] Unhandled error: If you see this message, please report it in Autosubmit's GitLab project
I had noticed this issue some time ago (ref: https://gist.github.com/kinow/2770a30d463ab91ccac2514537f8d547), and the fix at the time was the following:
diff --git a/autosubmit/autosubmit.py b/autosubmit/autosubmit.py
index aac478cd..8643d81c 100644
--- a/autosubmit/autosubmit.py
+++ b/autosubmit/autosubmit.py
@@ -591,6 +591,10 @@ class Autosubmit:
args = parser.parse_args()
+ if args.command is None:
+ parser.print_help()
+ parser.exit()
+
except Exception as e:
if type(e) is SystemExit: #todo check
# Version keyword force an exception in parse arg due and os_exit(0) but the program is succesfully finished