I’m facing an issue while building MoveIt on ROS [HUMBLE] with Python 3.10.12. The error is related to the rosidl_adapter module and seems to involve an attribute error with the em module. Here’s the relevant error message:

CMake Error at /opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:59 (message): execute_process(/usr/local/bin/python3.7 -m rosidl_adapter --package-name controller_manager_msgs --arguments-file /home/ubuntu/build/controller_manager_msgs/rosidl_adapter__arguments__controller_manager_msgs.json –output-dir /home/ubuntu/build/controller_manager_msgs/rosidl_adapter/controller_manager_msgs –output-file /home/ubuntu/build/controller_manager_msgs/rosidl_adapter/controller_manager_msgs.idls) returned error code 1:

AttributeError processing template ‘msg.idl.em’

Traceback (most recent call last):

File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/init.py", line 48, in evaluate_template _interpreter = em.Interpreter(

AttributeError: module ‘em’ has no attribute ‘Interpreter’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/main.py", line 19, in sys.exit(main()) File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/main.py", line 55, in main pathlib.Path(relative_path), output_dir) File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/init.py", line 20, in convert_to_idl package_dir, package_name, interface_file, output_dir / 'msg') File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/msg/init.py", line 39, in convert_msg_to_idl expand_template('msg.idl.em', data, output_file, encoding='iso-8859-1') File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/init.py", line 23, in expand_template content = evaluate_template(template_name, data) File "/opt/ros/humble/local/lib/python3.10/dist-packages/rosidl_adapter/resource/init.py", line 69, in evaluate_template _interpreter.shutdown()

AttributeError: ‘NoneType’ object has no attribute ‘shutdown’

Call Stack (most recent call first): /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:130 (rosidl_adapt_interfaces) CMakeLists.txt:28 (rosidl_generate_interfaces)


ROS Distribution: [HUMBLE]
MoveIt Version: [MOVEIT2]
Python Version: 3.10.12

I have attempted some step to resolve this but the issue persists. Any guidance or suggestions on resolving this issue would be greatly appreciated.

Thank you!

  • $\begingroup$ What platform are you using? And how did you install that version of python it's not the supported version of python on jammy. And it looks like you're using the Debian packages, but if you're overriding the python version that's not expected to run. Please edit your question to provide enough information to reproduce your problem. $\endgroup$
    – Tully
    Commented Feb 1 at 9:39
  • $\begingroup$ Also what version of empy have you installed? $\endgroup$
    – Tully
    Commented Feb 1 at 9:41
  • $\begingroup$ i using ubuntu 22.04 em Version: 0.4.0 $\endgroup$ Commented Feb 1 at 11:01

1 Answer 1


I see at least two issues here.

First is that you should never mix prebuilt packages and alternative versions of python. ROS can be used with alternative versions of python, but when you do you need to build your entire workspace from source.

You can find more info in this question about selecting a different version of python.

If you look in your traceback some parts are using python3.7 and other parts are using python3.10 this mixture is going to cause you problems! And it appears that both of those are local installations so you're not cleanly setting up your environment with either locally installed version of python. When you add a new one to your environment, make sure to remote all traces of the other versions.

Your other problem is that I think that you've installed the wrong dependency we use empy https://pypi.org/project/empy/#history

Which is different than em



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.