Ask Your Question
0

override_check error during build

asked 2022-05-11 04:03:24 -0500

florian.pix gravatar image

When im building my ros2 workspace I always get the following error:

ERROR:colcon.colcon_core.package_selection:Exception in package selection extension 'override_check': argument --allow-overriding: conflicting option string: --allow-overriding
Traceback (most recent call last):
  File "/home/me/.local/lib/python3.8/site-packages/colcon_core/package_selection/__init__.py", line 109, in _add_package_selection_arguments
    retval = extension.add_arguments(parser=group)
  File "/usr/lib/python3/dist-packages/colcon_override_check/package_selection/override_check.py", line 52, in add_arguments
    parser.add_argument(
  File "/home/me/.local/lib/python3.8/site-packages/colcon_defaults/argument_parser/defaults.py", line 78, in add_argument
    argument = super().add_argument(*args, **kwargs)
  File "/home/me/.local/lib/python3.8/site-packages/colcon_core/argument_parser/destination_collector.py", line 46, in add_argument
    argument = super().add_argument(*args, **kwargs)
  File "/home/me/.local/lib/python3.8/site-packages/colcon_core/argument_parser/type_collector.py", line 34, in add_argument
    ret = super().add_argument(*args, **kwargs)
  File "/home/me/.local/lib/python3.8/site-packages/colcon_core/argument_parser/__init__.py", line 171, in add_argument
    return self._parser.add_argument(*args, **kwargs)
  File "/home/me/.local/lib/python3.8/site-packages/colcon_argcomplete/argument_parser/argcomplete/__init__.py", line 49, in add_argument
    argument = self._parser.add_argument(*args, **kwargs)
  File "/usr/lib/python3.8/argparse.py", line 1398, in add_argument
    return self._add_action(action)
  File "/usr/lib/python3.8/argparse.py", line 1602, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/usr/lib/python3.8/argparse.py", line 1412, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python3.8/argparse.py", line 1551, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python3.8/argparse.py", line 1560, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --allow-overriding: conflicting option string: --allow-overriding

How can I avoid it ? Is it due to the layer setup ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-27 21:36:53 -0500

nuclearsandwich gravatar image

You should be able to resolve this error by updating your installed versions of colcon packages to the latest for each version.

If you installed colcon via apt, an apt update && apt upgrade will bring your colcon packages up-to-date (although it will also apply all other pending updates on your system so if you are not already doing that regularly it may be worth it to check what will change).

If you installed colcon with pip there is not a system-wide upgrade command that I'm aware of. You may be able to upgrade colcon packages and their dependencies with pip install --upgrade --upgrade-strategy eager colcon-common-extensions but you may need to individually list and then upgrade each colcon package to make sure they are all using the latest version.

This problem was caused when the override check was split out into a separate package because the initial version of the functionality was provided by colcon core. As a result, installing colcon-override-check without updating colcon-core results in the argument being added twice, creating this conflict.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-05-11 04:03:24 -0500

Seen: 46 times

Last updated: Jun 27