Opened 10 years ago
Closed 10 years ago
#240 closed defect (fixed)
Rainbow command: Missing required "objects" positional argument
Reported by: | Tom Goddard | Owned by: | Greg Couch |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Command Line | Version: | |
Keywords: | Cc: | meng@… | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
When the rainbow command is issued with no arguments it gives the error
Missing required "objects" positional argument
The rainbow command has a required objects arguments, registered with type
Or(ObjectsArg, EmptyArg)
and should permit no argument to be specified.
Another oddity of this error is that the log shows the error message and but does not show the "rainbow" command was typed.
Attachments (1)
Change History (4)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I wonder if there is some change to our command registration API could help. Specifically I think having “required” options that aren’t actually required is confusing and is going to confuse any outside developers.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed by continuing to parse required positional arguments with an empty string. Had to change atomspec parsing to given AnnotationError instead of an AssertionError when given an empty string.
This one is difficult, since there is no text after the command name, the argument type annotation is never checked.