I am getting this error when using the colcon build command. I don't know how this occurred and everything was working really fine.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2866, in get_entry_map
ep_map = self._ep_map
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2828, in __getattr__
raise AttributeError(attr)
AttributeError: _ep_map. Did you mean: '_dep_map'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/colcon", line 11, in <module>
load_entry_point('colcon-core==0.11.0', 'console_scripts', 'colcon')()
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 118, in main
return _main(command_name=command_name, argv=argv)
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 143, in _main
parser = create_parser('colcon_core.environment_variable')
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 240, in create_parser
get_environment_variables_epilog(
File "/usr/lib/python3/dist-packages/colcon_core/command.py", line 289, in get_environment_variables_epilog
entry_points = load_entry_points(group_name)
File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 116, in load_entry_points
for entry_point in get_entry_points(group_name).values():
File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 94, in get_entry_points
for entry_point in iter_entry_points(group=group_name):
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 646, in <genexpr>
for entry in dist.get_entry_map(group).values()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2868, in get_entry_map
ep_map = self._ep_map = EntryPoint.parse_map(
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2557, in parse_map
maps[group] = cls.parse_group(group, lines, dist)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2535, in parse_group
ep = cls.parse(line, dist)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2513, in parse
raise ValueError(msg, src)
ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format", '<<<<<<< HEAD')
Things I have tried!
I haven't found any solution online, and also the auto completion for colcon is also not working
- I have tried re-installing python3-colcon-common-extensions package using
sudo apt install python3-colcon-common-extensions
also I have these sources in my .bashrc file
# ros-humble-source
source /opt/ros/humble/setup.bash
colcon_cd command setup
source /usr/share/colcon_cd/function/colcon_cd.sh
export _colcon_cd_root=/opt/ros/humble/
colcon tab completion
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
setup.pyfile in the build tool folders. I am totally confused on how this actually have happened. I have tried to reinstall ros2 humble but the issue was not resolved. – Jishnu Jan 17 '23 at 10:08.bashrcfile and the issue was probably asourcecommand to a custom ros workspace that I have created, the issue got resolved once I removed the source script from the bash file, Thank you! – Jishnu Jan 17 '23 at 12:27