Build Error on ROS Noetic
AndreasR30 opened this issue · 5 comments
Description
Build error on ROS Noetic:
ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.environment_variable.powershell_command': cannot import name 'OVERRIDE_OPT' from 'em' (/usr/local/bin/em.py)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/colcon_core/entry_point.py", line 101, in load_entry_points
extension_type = load_entry_point(entry_point)
File "/usr/local/lib/python3.8/dist-packages/colcon_core/entry_point.py", line 143, in load_entry_point
return entry_point.load()
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2516, in load
return self.resolve()
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2522, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.8/dist-packages/colcon_powershell/shell/powershell.py", line 17, in <module>
from colcon_core.shell.template import expand_template
File "/usr/local/lib/python3.8/dist-packages/colcon_core/shell/template/__init__.py", line 9, in <module>
from em import OVERRIDE_OPT
ImportError: cannot import name 'OVERRIDE_OPT' from 'em' (/usr/local/bin/em.py)
We get the same error for our project: https://github.com/UniBwTAS/continuous_clustering
Expected Behavior
No build error
Actual Behavior
See above
To Reproduce
Go to e.g.: https://github.com/ros-tooling/action-ros-ci/actions/runs/7080429409/job/19268309677
System (please complete the following information)
- OS: Ubuntu 20.04
- ROS 2 Distro: Noetic
Hey there, experiencing a similar error for foxy installation:
ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.environment_variable.powershell_command': cannot import name 'OVERRIDE_OPT' from 'em' (/usr/local/bin/em.py) The Python package 'empy' must be installed and 'em' must not be installed since both packages share the same namespace
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/colcon_core/entry_point.py", line 120, in load_entry_points
extension_type = load_entry_point(entry_point)
File "/usr/local/lib/python3.8/dist-packages/colcon_core/entry_point.py", line [16](https://github.com/maliput/maliput_infrastructure/actions/runs/7084390156/job/19278567163#step:10:17)8, in load_entry_point
return entry_point.load()
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2516, in load
return self.resolve()
File "/usr/local/lib/python3.8/dist-packages/pkg_resources/__init__.py", line 2522, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python3.8/dist-packages/colcon_powershell/shell/powershell.py", line [17](https://github.com/maliput/maliput_infrastructure/actions/runs/7084390156/job/19278567163#step:10:18), in <module>
from colcon_core.shell.template import expand_template
File "/usr/local/lib/python3.8/dist-packages/colcon_core/shell/template/__init__.py", line [19](https://github.com/maliput/maliput_infrastructure/actions/runs/7084390156/job/19278567163#step:10:20), in <module>
raise e from None
File "/usr/local/lib/python3.8/dist-packages/colcon_core/shell/template/__init__.py", line 10, in <module>
from em import OVERRIDE_OPT
ImportError: cannot import name 'OVERRIDE_OPT' from 'em' (/usr/local/bin/em.py) The Python package 'empy' must be installed and 'em' must not be installed since both packages share the same namespace
PS: Also humble(+ ubuntu 22 )
Oh it was fixed via setup-ros action. Check this ros-tooling/setup-ros#632 @AndreasR30 . Simply update setup-ros to v0.7
For users of setup-ros
, this was indeed fixed in v0.7
. However, if you build against EOL distros, you currently need to use older versions. See ros-tooling/setup-ros#634.
Go to e.g.: https://github.com/ros-tooling/action-ros-ci/actions/runs/7080429409/job/19268309677
Note that this job uses setup-ros-docker
, which also requires a fix: ros-tooling/setup-ros-docker#63.
This should be fixed by setup-ros@v0.7
and the latest setup-ros-docker
images, so I'll close this.
For people still using setup-ros@v0.6
because of Foxy, I've backported the fix, see ros-tooling/setup-ros#634 (comment).