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

ros2action.api ActionTypeCompleter results in traceback #896

Closed
Algias opened this issue Apr 10, 2024 · 3 comments
Closed

ros2action.api ActionTypeCompleter results in traceback #896

Algias opened this issue Apr 10, 2024 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@Algias
Copy link

Algias commented Apr 10, 2024

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • Binaries
  • Version or commit hash:
    • humble
  • DDS implementation:
    • N/A
  • Client library (if applicable):
    • rclpy

Steps to reproduce issue

from ros2action.api import ActionTypeCompleter
completer = ActionTypeCompleter()
completer("", None)

Similarly

from ros2action.api import action_type_completer
action_type_completer()

Expected behavior

ActionTypeCompleter should be a callable that returns a list of actions available from packages if an action name is not passed in.

Actual behavior

A traceback occurs indicating the bug

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2action/api/__init__.py", line 92, in __call__
    return action_type_completer()
  File "/opt/ros/humble/lib/python3.10/site-packages/ros2action/api/__init__.py", line 78, in action_type_completer
    for package_name, action_names in get_action_interfaces.items():
AttributeError: 'function' object has no attribute 'items'

Or in the case it is used in a verb with tab-complete, no items are displayed.

Additional information

I believe the bug is on this line which is present in rolling as of the indicated commit:

for package_name, action_names in get_action_interfaces.items():

ServiceTypeCompleter does not have this issue

for package_name, service_names in get_service_interfaces().items():

@clalancette
Copy link
Contributor

I believe the bug is on this line which is present in rolling as of the indicated commit:

Yep, that looks like it is the problem. Thanks for tracking it down. Would you be interested in opening a pull request to fix it? Then we can review it and get it in.

@clalancette clalancette added the help wanted Extra attention is needed label Apr 10, 2024
@fujitatomoya
Copy link
Collaborator

i happened to meet this problem, fix is ready #898

@fujitatomoya
Copy link
Collaborator

closing in favor of #898, all backports (jazzy, iron and humble) completed as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants