RustPython/RustPython · error · ArgumentError

conflicting option strings: %s

Error message

conflicting option strings: %s

What it means

Error "conflicting option strings: %s" thrown in RustPython/RustPython.

Source

Thrown at Lib/argparse.py:1728

        confl_optionals = []
        for option_string in action.option_strings:
            if option_string in self._option_string_actions:
                confl_optional = self._option_string_actions[option_string]
                confl_optionals.append((option_string, confl_optional))

        # resolve any conflicts
        if confl_optionals:
            conflict_handler = self._get_handler()
            conflict_handler(action, confl_optionals)

    def _handle_conflict_error(self, action, conflicting_actions):
        message = ngettext('conflicting option string: %s',
                           'conflicting option strings: %s',
                           len(conflicting_actions))
        conflict_string = ', '.join([option_string
                                     for option_string, action
                                     in conflicting_actions])
        raise ArgumentError(action, message % conflict_string)

    def _handle_conflict_resolve(self, action, conflicting_actions):

        # remove all conflicting options
        for option_string, action in conflicting_actions:

            # remove the conflicting option
            action.option_strings.remove(option_string)
            self._option_string_actions.pop(option_string, None)

            # if the option now has no option string, remove it from the
            # container holding it
            if not action.option_strings:
                action.container._remove_action(action)

    def _check_help(self, action):
        if action.help and hasattr(self, "_get_validation_formatter"):
            formatter = self._get_validation_formatter()

View on GitHub (pinned to aaeab4f754)

When it happens

Trigger: Thrown at Lib/argparse.py:1728 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of RustPython/RustPython@aaeab4f754 (2026-08-17). Data as JSON: /api/errors/44a332e45ca07ea8. Report an issue: GitHub.