-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Edit:
I've been using import_message_from_namespaced_type wrong due to misleading erroneous mypy specifications
def import_message_from_namespaced_type(message_type: NamespacedType)Leaving this issue open until the specification get fixed.
Original:
Bug report
Required Info:
- Operating System:
- Ubuntu 18.04
- Installation type:
- source
- Version or commit hash:
- DDS implementation:
- Fast-RTPS
- Client library (if applicable):
- rclpy
Steps to reproduce issue
from rosidl_parser.definition import NamespacedType
from rosidl_runtime_py.import_message import import_message_from_namespaced_type
message = import_message_from_namespaced_type(
NamespacedType(['std_msgs', 'msg'], 'Bool'))Expected behavior
Imports a std_msgs/msg/Bool
Actual behavior
Crash
AttributeError: 'NamespacedType' object has no attribute 'value_type'
Additional information
Crash comes from import_message_from_namespaced_type which expects a NamespacedType for input arg. NamespacedType expects as input args Iterable[str], str.
NamespacedType has base AbstractNestableType whereas the '__slots__' value_type comes from AbstractNestedType. Am I missing something or is it a bug ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working