icann / lgr-core

Label Generation Ruleset — Core library and manipulation functions
Other
8 stars 10 forks source link

argparse.ArgumentError: argument -v/--verbose: conflicting option strings: -v, --verbose #34

Closed gbicann closed 2 months ago

gbicann commented 1 year ago

Following on from the issue I raised in #32, I'm now getting another error when I try to run lgr_validate.py. This is using the version in v6.1.0 rather than what's in git (although I imagine there isn't much difference at the moment):

Traceback (most recent call last):
  File "/usr/local/bin/lgr_validate.py", line 135, in <module>
    main()
  File "/usr/local/bin/lgr_validate.py", line 107, in main
    parser.add_logging_args()
  File "/usr/local/lib/python3.10/dist-packages/lgr/tools/utils.py", line 316, in add_logging_args
    self.add_argument('-v', '--verbose', action='store_true',
  File "/usr/lib/python3.10/argparse.py", line 1460, in add_argument
    return self._add_action(action)
  File "/usr/lib/python3.10/argparse.py", line 1826, in _add_action
    self._optionals._add_action(action)
  File "/usr/lib/python3.10/argparse.py", line 1662, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/usr/lib/python3.10/argparse.py", line 1474, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python3.10/argparse.py", line 1611, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python3.10/argparse.py", line 1620, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument -v/--verbose: conflicting option strings: -v, --verbose
j-bernard commented 1 year ago

Thanks for the report. Please check against branch 6.1.1 for a fixed version.

j-bernard commented 2 months ago

Version 6.1.1 released with the fix