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)

signature.asc (801 bytes ) - added by goddard@… 10 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (4)

comment:1 by Greg Couch, 10 years ago

This one is difficult, since there is no text after the command name, the argument type annotation is never checked.

comment:2 by goddard@…, 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.

signature.asc

by goddard@…, 10 years ago

Attachment: signature.asc added

Added by email2trac

comment:3 by Greg Couch, 10 years ago

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.