Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error on ROS Noetic #839

Closed
AndreasR30 opened this issue Dec 4, 2023 · 5 comments
Closed

Build Error on ROS Noetic #839

AndreasR30 opened this issue Dec 4, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@AndreasR30
Copy link

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
@AndreasR30 AndreasR30 added the bug Something isn't working label Dec 4, 2023
@francocipollone
Copy link
Contributor

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 )

@francocipollone
Copy link
Contributor

Oh it was fixed via setup-ros action. Check this ros-tooling/setup-ros#632 @AndreasR30 . Simply update setup-ros to v0.7

@christophebedard
Copy link
Member

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.

@christophebedard
Copy link
Member

christophebedard commented Dec 4, 2023

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.

@christophebedard
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants