Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • autosubmit autosubmit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 338
    • Issues 338
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • autosubmitautosubmit
  • Issues
  • #868
Closed
Open
Issue created Sep 20, 2022 by Bruno de Paula Kinoshita@bdepaulaMaintainer

[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
Assignee
Assign to
Time tracking