You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/python3.12/site-packages/simple_parsing/parsing.py", line 1044, in parse
parsed_args = parser.parse_args(args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/argparse.py", line 1895, in parse_args
args, argv = self.parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/site-packages/simple_parsing/parsing.py", line 345, in parse_known_args
self._preprocessing(args=args, namespace=namespace)
File "/python3.12/site-packages/simple_parsing/parsing.py", line 549, in _preprocessing
wrapped_dataclass.add_arguments(parser=self)
File "/python3.12/site-packages/simple_parsing/wrappers/dataclass_wrapper.py", line 214, in add_arguments
_ = group.add_argument(*wrapped_field.option_strings, **arg_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/argparse.py", line 1459, in add_argument
kwargs = self._get_positional_kwargs(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python3.12/argparse.py", line 1575, in _get_positional_kwargs
raise TypeError(msg)
TypeError: 'required' is an invalid argument for positional
Describe the bug
Optional positional arguments throw a "TypeError: 'required' is an invalid argument for positional" error in argparse.
To Reproduce
Produces this error:
Issue resolved in PR: #345
The text was updated successfully, but these errors were encountered: