ros2 / ros2/rosidl_python

Failed <<< rosidl_generator_py [7.26s, exited with code 1]

Open
#219 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
EmberScript
Stars
26
Forks
68
Avg merge
2d 13h
Merged PRs (30d)
1

Description

Bug report

Required Info:

  • Operating System:
    Fedora 41 Linux
  • Installation type:
    Source
  • Version or commit hash:
    Jazzy
  • DDS implementation:
    Default
  • Client library (if applicable):
    Unknown
Steps to reproduce issue
Expected behavior

build without error

Actual behavior
starting >>> rosidl_generator_py
Starting >>> rosidl_typesupport_cpp                                                                                          
--- stderr: rosidl_generator_py                                                                                              
CMake Error at /home/me/ros2_jazzy/install/rosidl_adapter/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake:57 (message):
  execute_process(/usr/bin/python3 -m rosidl_adapter --package-name
  rosidl_generator_py --arguments-file
  /home/me/ros2_jazzy/build/rosidl_generator_py/rosidl_adapter__arguments__rosidl_generator_py_custom.json
  --output-dir
  /home/me/ros2_jazzy/build/rosidl_generator_py/rosidl_adapter/rosidl_generator_py
  --output-file
  /home/me/ros2_jazzy/build/rosidl_generator_py/rosidl_adapter/rosidl_generator_py_custom.idls)
  returned error code 1:

  AttributeError processing template 'msg.idl.em'

  Traceback (most recent call last):

    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-packages/rosidl_adapter/resource/__init__.py", line 51, in evaluate_template
      em.BUFFERED_OPT: True,
      ^^^^^^^^^^^^^^^

  AttributeError: module 'em' has no attribute 'BUFFERED_OPT'



  During handling of the above exception, another exception occurred:



  Traceback (most recent call last):

    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-packages/rosidl_adapter/__main__.py", line 19, in <module>
      sys.exit(main())
               ~~~~^^
    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-packages/rosidl_adapter/main.py", line 53, in main
      abs_idl_file = convert_to_idl(
          pathlib.Path(basepath), args.package_name,
          pathlib.Path(relative_path), output_dir)
    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-packages/rosidl_adapter/__init__.py", line 19, in convert_to_idl
      return convert_msg_to_idl(
          package_dir, package_name, interface_file, output_dir / 'msg')
    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-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 "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-packages/rosidl_adapter/resource/__init__.py", line 23, in expand_template
      content = evaluate_template(template_name, data)
    File "/home/me/ros2_jazzy/install/rosidl_adapter/lib/python3.13/site-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):
  /home/me/ros2_jazzy/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:132 (rosidl_adapt_interfaces)
  CMakeLists.txt:50 (rosidl_generate_interfaces)


---
Failed   <<< rosidl_generator_py [7.26s, exited with code 1]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Fedora 41 Jazzy source build and start at rosidl_adapter/resource/init.py, especially evaluate_template, then trace the call from rosidl_adapter/msg/init.py and rosidl_adapt_interfaces.cmake. Done means rosidl_generator_py builds without the template AttributeError or the follow-on shutdown error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.