Closed Freed-Wu closed 1 year ago
Are you using the choices=
parameter of add_argument? If so, make sure you are providing a tuple. I provided a list in my case, which resulted in this error.
OK, good suggestion. However, it still is a bug which need to be fixed :bug:.
As per https://docs.python.org/3/library/argparse.html#choices it seems any sequence should be supported. I don't think that includes dict
(assert not isinstance(dict, typing.Sequence)
)
So what shall be the fix be ?
I try to generate completes for tensorboard https://github.com/tensorflow/tensorboard/pull/5902, only zsh failed:
From command line, it also failed.
Thanks.